Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino/arduino-alvik-mpy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.4.0
Choose a base ref
...
head repository: arduino/arduino-alvik-mpy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 2,014 additions and 514 deletions.
  1. +31 −5 README.md
  2. +10 −0 arduino_alvik/__init__.py
  3. +1,010 −107 arduino_alvik/arduino_alvik.py
  4. +2 −2 arduino_alvik/pinout_definitions.py
  5. +3 −0 arduino_alvik/robot_definitions.py
  6. +6 −4 arduino_alvik/stm32_flash.py
  7. +2 −2 examples/{ → actuators}/leds_setting.py
  8. +2 −2 examples/{ → actuators}/move_wheels.py
  9. +80 −0 examples/actuators/pose_example.py
  10. +22 −0 examples/actuators/set_servo.py
  11. +65 −0 examples/actuators/wheels_position.py
  12. +2 −2 examples/{ → actuators}/wheels_speed.py
  13. +28 −0 examples/arduino-runtime/blink.py
  14. +64 −0 examples/arduino-runtime/line_follower.py
  15. +26 −0 examples/arduino-runtime/read_tof.py
  16. +25 −0 examples/communication/i2c_scan.py
  17. +35 −0 examples/communication/modulino.py
  18. +21 −8 examples/{ → demo}/demo.py
  19. +43 −0 examples/demo/hand_follower.py
  20. +65 −0 examples/demo/line_follower.py
  21. 0 examples/{ → demo}/main.py
  22. +43 −42 examples/{ → demo}/touch_move.py
  23. +44 −0 examples/events/hot_wheels.py
  24. +53 −0 examples/events/motion_events.py
  25. +24 −2 examples/{wheels_position.py → events/timer_one_shot_events.py}
  26. +69 −0 examples/events/timer_periodic_events.py
  27. +20 −8 examples/{ → events}/touch_events.py
  28. +21 −3 examples/flash_firmware.py
  29. +0 −38 examples/hand_follower.py
  30. +0 −64 examples/line_follower.py
  31. +0 −85 examples/pose_example.py
  32. +14 −0 examples/reload_modules.py
  33. +2 −2 examples/{ → sensors}/read_color_sensor.py
  34. +2 −2 examples/{ → sensors}/read_imu.py
  35. +16 −0 examples/sensors/read_orientation.py
  36. +2 −2 examples/{ → sensors}/read_tof.py
  37. +2 −2 examples/{ → sensors}/read_touch.py
  38. +0 −124 examples/test_meas_units.py
  39. +3 −3 examples/{ → tests}/message_reader.py
  40. +2 −2 examples/{ → tests}/test_idle.py
  41. +122 −0 examples/tests/test_meas_units.py
  42. +19 −0 examples/tests/test_version.py
  43. +8 −0 examples/update_firmware.py
  44. +1 −0 install.bat
  45. +1 −0 install.sh
  46. +4 −3 package.json
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,11 +9,12 @@



## How to Install Micropython library
## How to Install the Micropython library

### 1. install mpremote

[mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html) is needed to upload files on the [Arduino® Nano ESP32](https://store.arduino.cc/products/nano-esp32?gad_source=1&gclid=Cj0KCQiA2KitBhCIARIsAPPMEhLtIxV_s7KyLJO4-69RdR1UeFTdgGK_XmI8w7xdbur4gs1oJU4Jl68aAhbaEALw_wcB).
Minimum suggested mpremote release is 1.22.0

```shell
(venv)$ pip install mpremote
@@ -34,13 +35,26 @@ Windows
***Note: The -p parameter is optional***


__NOTE: DO NOT USE LAB FOR MICROPYTHON TO UPLOAD BIN FILES__
__WARNING: do not open bin files with Arduino Lab for Micropython 0.8.0 because they will be corrupted__

### 2.1 mip (MicroPython Package Manager)
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:

```py
import mip

mip.install('github:arduino/arduino-alvik-mpy')

```

<br>
<br>

### 3. Update firmware on your Arduino® Alvik

Download the latest [Arduino Alvik Carrier Firmware code](https://github.com/arduino-libraries/Arduino_AlvikCarrier) (to compile the firmware using Arduino IDE) or the [pre-compiled firmware](https://github.com/arduino-libraries/Arduino_AlvikCarrier/releases/latest)

Go into `utilities` folder and run:
```shell
Linux
@@ -72,7 +86,7 @@ You can now use Arduino Lab for Micropython to run your examples remotely from t

## Default Demo

Use `mpremote` to copy following the files from the examples folder:
Use `mpremote` to copy following the files from the `examples\demo` folder:
- `main.py`, this file allows you to automatically start the demo
- `demo.py`, demo launcher
- `touch_move.py`, programming the robot movements via touch buttons demo
@@ -92,7 +106,7 @@ Each color allows to run a different demo as following:

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.
To run a different demo, press the `CANCEL touch button` and you will be redirected to the main menu.

### 1. Touch mode example (RED)
This example starts with the red leds on.
@@ -111,6 +125,7 @@ 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.
Pressing the `CANCEL touch button` two times during sequence programming you will be redirected to the main menu.

<br>

@@ -142,4 +157,15 @@ It is possible to stop the robot at any time by pressing the `CANCEL touch butto
<br>
<br>

__Note: not open bin files with Arduino Lab for Micropython because they will be corrupted__
__WARNING: do not open bin files with Arduino Lab for Micropython 0.8.0 because they will be corrupted__


<br>
<br>
<br>


## Useful links
- [Arduino_Alvik](https://github.com/arduino-libraries/Arduino_Alvik): Arduino library required to program Alvik
- [Arduino_AlvikCarrier](https://github.com/arduino-libraries/Arduino_AlvikCarrier): Arduino library required to build the firmware
- [Arduino Alvik product page](https://store.arduino.cc/pages/alvik)
10 changes: 10 additions & 0 deletions arduino_alvik/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
"""
Arduino Alvik micropython library
"""

__author__ = "Lucio Rossi <l.rossi@arduino.cc>, Giovanni Bruno <g.bruno@arduino.cc>"
__license__ = "MPL 2.0"
__version__ = "1.1.4"
__maintainer__ = "Lucio Rossi <l.rossi@arduino.cc>, Giovanni Bruno <g.bruno@arduino.cc>"
__required_firmware_version__ = "1.1.1"

from .arduino_alvik import *
Loading