A tool with easy prebuilt function to communicate through PySerial
Project description
SimpleSerial is a small package that can help anyone who needs quick and simple functions for communication with micro controllers. You can do things like read incoming data constantly, check the incoming data, as well as send through multiple very simple functions.
Some simple functions included with the package:
SimpleSerialMain.readDataOnce(data, rate=9600, debug=0) This returns the data of the broadcasted information of the microcontroller once.
You can change the data argument to a string that contains what you want to check the broadcasted information of the microcontroller to. If you have data equal to "Hello, World" in the function and the microcontroller is broadcasting "Hello, World"; The function will return True. Otherwise it will return False. (Optional)
Rate can be changed to your baudrate of the microcontroller (Normally 9600).
Debug can be set to 1 to have coloured progress checks (Optional).
SimpleSerialMain.writeDataOnce(data, rate=9600, debug=0) This writes the variable "data" to the microcontroller.
Rate can be changed to your baudrate of the microcontroller (Normally 9600).
Debug can be set to 1 to have coloured progress checks (Optional).
SimpleSerialMain.readDataForMultipleItemsOnce(data, rate=9600, debug=0) This will check data of the broadcasted information of the microcontroller once for multiple items (data).
You can change the data argument to a list that contains what you want to check the broadcasted information of the microcontroller to. If you have data contain "Hello, World" in the function and the microcontroller is broadcasting "Hello, World"; The function will return True. Otherwise it will keep checking for another item in the list.
Rate can be changed to your baudrate of the microcontroller (Normally 9600).
Debug can be set to 1 to have coloured progress checks (Optional).
SimpleSerialMain.readDataForMultipleItemsConstantly(data, rate=9600, debug=0) This will check data of the broadcasted information of the microcontroller until it finds a wanted item (data).
You can change the data argument to a list that contains what you want to check the broadcasted information of the microcontroller to. If you have data contain "Hello, World" in the function and the microcontroller is broadcasting "Hello, World"; The function will return True. Otherwise it will return False unless it references another item in the list.
Rate can be changed to your baudrate of the microcontroller (Normally 9600).
Debug can be set to 1 to have coloured progress checks (Optional).
SimpleSerialMain.readDataForOneItemConstantly(data, rate=9600, debug=0) This will check data of the broadcasted information of the microcontroller until it finds an item (data).
You can change the data argument to a string that contains what you want to check the broadcasted information of the microcontroller to. If you have data equal to "Hello, World" in the function and the microcontroller is broadcasting "Hello, World"; The function will return True. Otherwise it will keep checking. (Optional)
Rate can be changed to your baudrate of the microcontroller (Normally 9600).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file SimpleSerial-0.2.0.tar.gz
.
File metadata
- Download URL: SimpleSerial-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 737577a0f5dca7c4c491719b3a230b356d058101b79e03094e1a3b64837de1bd |
|
MD5 | 91b0ec915d3279fb40db8a6684d4f8ca |
|
BLAKE2b-256 | a3c2ffb6aa7a22915e0cb24bf1641809c18ccbb2a2ced25885d7191f7b32c39b |
File details
Details for the file SimpleSerial-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: SimpleSerial-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00a6062dac5b20380be4cf0a27bfb0010a5e899b8f3eb9d73bc8b5dd1f7dd679 |
|
MD5 | 9b1958133c7a5b56aff68e3202371515 |
|
BLAKE2b-256 | 4c4c5e20cc7ba10b7edd863e549f99f935b11bf31a481287046036dbcd1be695 |