Tommaso Martorellasilvia11931
Published © GPL3+

Read and Write on Serial Port with Zerynth

In this tutorial we'll see how to read and write on a serial port using Zerynth.

EasyFull instructions provided1 hour114
Read and Write on Serial Port with Zerynth

Things used in this project

Hardware components

SparkFun ESP32 Thing
SparkFun ESP32 Thing
×1

Software apps and online services

Zerynth Studio
Zerynth Studio

Story

Read more

Schematics

sparkfun

Sparkfun ESP32 Thing
Sparkfun esp32 thing azz2xodtfc

Code

main.py

Python
################################################################################
# Serial Port Basics
#
# Created by Zerynth Team 2015 CC
# Authors: G. Baldi, D. Mazzei
################################################################################

import streams
# creates a serial port and name it "s"
s=streams.serial()

while True:
    print("Write some chars on the serial port and terminate with \\n (new line)")
    line=s.readline() # read and return any single character available on the serial port until a \n is found
    print("You wrote:", line)
    print()
    sleep (300)

Credits

Tommaso Martorella

Tommaso Martorella

4 projects • 1 follower
Contact
silvia11931

silvia11931

6 projects • 4 followers
Contact

Comments