Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epeios-q37/ucuq-python
For easy prototyping of projects based on Wi-Fi-equipped microcontrollers (RPi Pico (2) W, ESP32, ESP8266...).
https://github.com/epeios-q37/ucuq-python
esp32 esp8266 iot microcontroller micropython prototyping python raspberry-pi-pico remote-control wifi
Last synced: about 13 hours ago
JSON representation
For easy prototyping of projects based on Wi-Fi-equipped microcontrollers (RPi Pico (2) W, ESP32, ESP8266...).
- Host: GitHub
- URL: https://github.com/epeios-q37/ucuq-python
- Owner: epeios-q37
- License: mit
- Created: 2024-11-07T13:47:05.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-01-19T06:13:58.000Z (3 days ago)
- Last Synced: 2025-01-19T07:25:17.421Z (3 days ago)
- Topics: esp32, esp8266, iot, microcontroller, micropython, prototyping, python, raspberry-pi-pico, remote-control, wifi
- Language: Python
- Homepage:
- Size: 243 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microcontrolers unleashed
Python library for easy prototyping of assemblies based on microcontrollers such as *ESP32*, *ESP8266*, *Raspberry Pico (2) W*…
> Online demonstration available at https://zelbinium.q37.info/en/ucuq/.
## How to use it
### On the microcontroller
1. Install *Micropython* on the microcontroller;
2. create an *ucuq.json* file with below given content;
3. rename *ucuq_device.py* as *main.py*;
4. put *ucuq.json* and *main.py* on the microcontroller;
5. restart the microcontroller.Content of the *ucuq.json* file:
```json
{
"Identification": ["",""],
"WLAN": {
"": ["", ""]
},
"OnBoardLed": [, ],
}
```- *<device_token>*: token of the device ; choose one which can not be easily guessed; a token can be shared between several devices;
- *<device_id>*: id of the device, must be unique among devices with same token;
- *<wlan_name>*: name of the wlan (whatever value you want);
- *<wlan_ssid>*: SSID of the wlan;
- *<wlan_key>*: secret key of the wlan;
- *<led_pin>*: the pin of the onboard led from the microcontroller (usually an integer, but can be a string, as with the *RPI pico (2) W*);
- *<led_logic>*: `true` when the led lights up when the pin level is high, `false` otherwise.The `OnBoardLed` entry can be omitted.
You can put more then one entry under the `WLAN`; the microcontroller will automatically connect to the available one. For example the first may be the smartphone's access point, the second your home's Wi-Fi.
### On you computer
1. Retrieve this repository;
2. launch the *Config* app (in the demos folder);
3. fill the field accordingly to the content of the *usuq.json* file described above (`Identification`/`device_token` and `Identification`/`device_id`);
4. click on *Save* and quit the app.As an example, to light up a LED connected to your device, create a file with below code and adapt it to your microcrocontroller:
```python
import ucuqucuq.GPIO().high()
ucuq.commit()
```Replace `` with the number corresponding of the onboard led pin number or string (or of whichever led connected to your microcontroller). With some controller, the led lights up when the corresponding pin is at low level, so you have to replace `high` with `low`. Launch this program with *python3*.