Difference between revisions of "Swagbadge2021 GettingStarted"
(Created page with "= Getting started with the Swagbadge = == My package arrived in the mail, first steps. == * Your package should contain [insert photo here] * Turning it on and off again * On...") |
|||
Line 3: | Line 3: | ||
== My package arrived in the mail, first steps. == | == My package arrived in the mail, first steps. == | ||
* Your package should contain [insert photo here] | * Your package should contain [insert photo here] | ||
+ | * Powering it up | ||
+ | ** Insert the micro USB cable into the badge and connect the other end to a USB port on your computer. | ||
+ | ** A green light should glow on the board. | ||
* Turning it on and off again | * Turning it on and off again | ||
− | * On bootup, you should see. | + | ** If the board has a switch, you can switch it on/off safely. Otherwise just plugging/unplugging it will be sufficient. |
+ | * On bootup, you should see: | ||
+ | ** The OLED screens will display "Aiko 0.1" as a title | ||
+ | ** It will also display something else to tell you to set up your wifi. | ||
== Getting it on your network == | == Getting it on your network == | ||
* Safety precautions we have provided | * Safety precautions we have provided | ||
+ | ** When using any hardware ordered off the internet, you can't be quite certain what software might be present on it. Before shipping these badges to you, we reflashed a fresh copy of MicroPython onto the Lolin32. | ||
+ | ** The framework running on the badge is Aiko, which is open source. | ||
+ | ** The software on the badge is available on the CCHS repository, also all open source. | ||
+ | ** The badges are designed to communicate over MQTT - a lightweight standard for messaging on IoT devices, but we are aware of privacy considerations: you don't want anybody able to control your badge from afar. The swagbadge protocol provides support for encrypted messages. | ||
* Restart device | * Restart device | ||
+ | ** The first time you boot your device, it won't know how to talk to your network. If it can't detect a pre-existing set of network credentials, or connect to anything it knows about, it will establish a temporary access point and prompt you to navigate to it to enter your wifi details. | ||
+ | ** This will look like ... | ||
+ | ** You can now restart your device | ||
* On bootup you should now see... | * On bootup you should now see... | ||
Line 20: | Line 33: | ||
== Updating the software framework == | == Updating the software framework == | ||
* anaconda or equiv | * anaconda or equiv | ||
− | * | + | ** <code>conda create -n swagbadge python=3</code> |
− | * git clone | + | ** <code>conda activate swagbadge</code> |
− | * git clone swagbadge stuff | + | * Get the latest version of the framework, Aiko for Micropython: <code>git clone https://github.com/geekscape/aiko_engine_mp.git</code> |
− | * mpfshell | + | * Get the latest version of the swagbadge applications, git clone swagbadge stuff |
+ | * Driving [https://github.com/wendlers/mpfshell mpfshell] | ||
+ | ** mpfshell lets you communicate with the ESP32. It provides a basic ftp-like capability to get files to and from the badge, as well as a shell, called REPL. This will let you see the log messages coming out of the badge as applications run on it. | ||
+ | ** pip install mpfshell | ||
+ | ** Unix: | ||
+ | *** <code>mpfshell <some sort of path></code> | ||
+ | ** Windows: | ||
+ | *** <code>mpfshell <com port></code> | ||
+ | *** How to find your com port: Use the Device Manager. Under the "Ports" entry, you'll see one or more entries. Hopefully one of which is your badge! It will tell you what Port it is on. If you can't see your badge, you might need to go up to the View menu and use "Show hidden devices" and see if that helps. | ||
+ | *** If nothing still shows up, you might need to update your [https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers USB drivers] for comms support. | ||
+ | |||
+ | == Software development == | ||
+ | |||
+ | * write code | ||
+ | * mpfshell to device | ||
+ | ** <code>put <localpath/file> <remotepath/file></code> | ||
+ | ** <code>repl</code> | ||
+ | * push the reboot button on the lolin32 | ||
+ | * watch the output go by - hopefully you don't see any errors! | ||
+ | * To get out of mpfshell | ||
+ | ** Press <code>Ctrl-Q</code> (or equivalent) | ||
+ | ** type <code>exit</code> |
Revision as of 09:00, 19 October 2020
Contents
Getting started with the Swagbadge
My package arrived in the mail, first steps.
- Your package should contain [insert photo here]
- Powering it up
- Insert the micro USB cable into the badge and connect the other end to a USB port on your computer.
- A green light should glow on the board.
- Turning it on and off again
- If the board has a switch, you can switch it on/off safely. Otherwise just plugging/unplugging it will be sufficient.
- On bootup, you should see:
- The OLED screens will display "Aiko 0.1" as a title
- It will also display something else to tell you to set up your wifi.
Getting it on your network
- Safety precautions we have provided
- When using any hardware ordered off the internet, you can't be quite certain what software might be present on it. Before shipping these badges to you, we reflashed a fresh copy of MicroPython onto the Lolin32.
- The framework running on the badge is Aiko, which is open source.
- The software on the badge is available on the CCHS repository, also all open source.
- The badges are designed to communicate over MQTT - a lightweight standard for messaging on IoT devices, but we are aware of privacy considerations: you don't want anybody able to control your badge from afar. The swagbadge protocol provides support for encrypted messages.
- Restart device
- The first time you boot your device, it won't know how to talk to your network. If it can't detect a pre-existing set of network credentials, or connect to anything it knows about, it will establish a temporary access point and prompt you to navigate to it to enter your wifi details.
- This will look like ...
- You can now restart your device
- On bootup you should now see...
What you can do now: with the software that is inbuilt
- Pre-installed things, how to access and run them.
Adding a SAO
- provided by others
- build your own (linky here to our docs)
Updating the software framework
- anaconda or equiv
-
conda create -n swagbadge python=3
-
conda activate swagbadge
-
- Get the latest version of the framework, Aiko for Micropython:
git clone https://github.com/geekscape/aiko_engine_mp.git
- Get the latest version of the swagbadge applications, git clone swagbadge stuff
- Driving mpfshell
- mpfshell lets you communicate with the ESP32. It provides a basic ftp-like capability to get files to and from the badge, as well as a shell, called REPL. This will let you see the log messages coming out of the badge as applications run on it.
- pip install mpfshell
- Unix:
-
mpfshell <some sort of path>
-
- Windows:
-
mpfshell <com port>
- How to find your com port: Use the Device Manager. Under the "Ports" entry, you'll see one or more entries. Hopefully one of which is your badge! It will tell you what Port it is on. If you can't see your badge, you might need to go up to the View menu and use "Show hidden devices" and see if that helps.
- If nothing still shows up, you might need to update your USB drivers for comms support.
-
Software development
- write code
- mpfshell to device
-
put <localpath/file> <remotepath/file>
-
repl
-
- push the reboot button on the lolin32
- watch the output go by - hopefully you don't see any errors!
- To get out of mpfshell
- Press
Ctrl-Q
(or equivalent) - type
exit
- Press