Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epeios-q37/ucuq
For easy prototyping of projects based on Wi-Fi-equipped microcontrollers (RPi Pico W, ESP32, ESP8266...).
https://github.com/epeios-q37/ucuq
Last synced: 24 days ago
JSON representation
For easy prototyping of projects based on Wi-Fi-equipped microcontrollers (RPi Pico W, ESP32, ESP8266...).
- Host: GitHub
- URL: https://github.com/epeios-q37/ucuq
- Owner: epeios-q37
- License: mit
- Created: 2024-11-07T13:47:05.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-29T14:50:28.000Z (about 1 month ago)
- Last Synced: 2024-12-06T05:34:07.748Z (28 days ago)
- Language: Python
- Size: 120 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
> There is an online demonstration of this library at https://zelbinium.q37.info/en/ucuq/.
## How to use it
### On the microcontroller
1. Install *Micropython* on your microcontroller;
2. create an *ucuq.json* file with below given content;
3. rename *ucuq.py* as *main.py*;
4. put *ucuq.py* and *main.py* on your 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 the 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 compter
1. Retrieve this repository;
2. launch the *Config* app (in the demos folder);
3. fill the field accordingly with 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*.