Arduino Alvik micropython library.
mpremote is needed to upload files on the Arduino® Nano ESP32. Minimum suggested mpremote release is 1.22.0
(venv)$ pip install mpremote
Run the following line to upload all files and download the dependencies needed to run the Arduino Alvik micropython library.
Linux
$ ./install.sh -p <device port>
Windows
> install.bat -p <device port>
Note: The -p parameter is optional
WARNING: do not open bin files with Arduino Lab for Micropython 0.8.0 because they will be corrupted
This is the recommended method for boards which can connect to Internet. Make sure your board is connected to the Internet and run the following MicroPython script using your favourite editor:
import mip
mip.install('github:arduino/arduino-alvik-mpy')
Download the latest Arduino Alvik Carrier Firmware code (to compile the firmware using Arduino IDE) or the pre-compiled firmware
Go into utilities
folder and run:
Linux
$ ./flash_firmware.sh -p <device port> <path-to-your-firmware>
Windows
> flash_firmware.bat -p <device port> <path-to-your-firmware>
Answer y
to flash firmware.
Note: The -p parameter is optional
Use mpremote
to copy files into your Arduino® Nano ESP32.
e.g.
(venv)$ mpremote connect "COM1" fs cp ./examples/led_setting.py :led_setting.py
You can now use Arduino Lab for Micropython to run your examples remotely from the device filesystem.
Use mpremote
to copy following the files from the examples\demo
folder:
main.py
, this file allows you to automatically start the demodemo.py
, demo launchertouch_move.py
, programming the robot movements via touch buttons demoline_follower.py
, black line follower demohand_follower.py
, hand following demo, the robot stays always at 10cm from an obstacle placed in front of it.
When the robot is turned on, the demo launcher starts after Alvik boot.
Blue leds on top turn on.
By pressing up and down arrows, it is possible to select different demos identified by different colors (blue, green and red).
Each color allows to run a different demo as following:
red
launches the touch-move demogreen
launches the hand following demoblue
launches the line follower demo
To run a demo, press the OK touch button
, after selecting the right demo color.
To run a different demo, turn the robot off and on again or reset the Arduino® Nano ESP32.
This example starts with the red leds on.
directional touch buttons
(UP, DOWN, LEFT, RIGHT) program the desired movements.
Everytime a directional touch button
is pressed, the leds blink in a purple color indicating that the command has been registered.
UP touch button
will register a 10 cm forward movementDOWN touch button
will register a 10 cm backward movementRIGHT touch button
will register a 90° clockwise rotation movementLEFT touch button
will register a 90° counterclockwise rotation movement
To clear the commands queue, press the CANCEL touch button
.
The leds will blink in red.
To start the sequence, press the OK touch button
.
Pressing the CANCEL touch button
at any time stops the robot and resets the sequence.
This example starts with the green leds on.
Place an obstacle or your hand in front of the robot.
To start the robot press the OK touch button
.
The robot will move to keep a 10 centimeters distance from the obstacle/hand.
It is possible to stop the robot at any time by pressing the CANCEL touch button
.
This example starts with the blue leds on.
To run this example, a white board and black tape (2cm wide) is required.
Place the robot at the center of the line and press the OK touch button
.
It is possible to stop the robot at any time by pressing the CANCEL touch button
.
WARNING: do not open bin files with Arduino Lab for Micropython 0.8.0 because they will be corrupted
- Arduino_Alvik: Arduino library required to program Alvik
- Arduino_AlvikCarrier: Arduino library required to build the firmware
- Arduino Alvik product page