Teaching myself Python Day 11
Today's learning consisted of learning how to open a USB serial port to read a serial data stream from a wireless module which receives temperature readings from remote wireless sensors.
This code is running on a Raspberry Pi and will eventually write the temperature readings to a MySQL database.
Next steps will include pulling the correct data from each data stream.
Here is the code from today's learning:
import serial
ser = serial.Serial('/dev/ttyUSB0',115200)
wloop = True
while wloop:
x = ser.readline()
print(x.decode('UTF-8'))
And here is a screen capture of the output from the program:
Leave Teaching myself Python Day 11 to:
Read more #hive-142614 posts
Best Posts From My Technology Trail
We have not curated any of mytechtrail's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From My Technology Trail
- A walk on the Beach
- Mounting my QRP transceiver
- Field Day 2022
- Kit build - QRPGuys Digital FSK Transceiver III
- Antenna Tuner kit build
- Next kit build, QRPGuys power/SWR/dummy load
- Improved Ham Shack layout
- Second power pole distribution board
- My first Ham Radio Fox Hunt
- Putting first kit build to use
- First Contact
- Kit build session 2
- Kit build session 1
- A pile of Ham Radio projects
- Pi Day 3.14 Win
- Oh woe is me
- Homemade pizza for a quiet Sunday supper
- Reuse, Repair and Recycle
- Snow Day yesterday
- RFI testing my Ham Radio rig