|
| 1 | +# Getting Started with Alvik on Arduino IDE |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +### Software |
| 6 | + |
| 7 | +- **Arduino IDE**: The primary development environment for writing, compiling, and uploading code to Alvik. |
| 8 | +- **Alvik Library for Arduino**: A library that provides easy access to the Alvik robot's functionalities. |
| 9 | +- **USB Drivers**: Ensure you have the correct drivers installed to communicate with Alvik via USB. |
| 10 | + |
| 11 | +### Hardware |
| 12 | + |
| 13 | +- **Alvik Robot**: The main platform you'll be programming. |
| 14 | +- **USB Cable**: Used to connect Alvik to your computer for programming and power. |
| 15 | +- **Computer**: Running Windows, macOS, or Linux with a USB port. |
| 16 | + |
| 17 | +## Setup |
| 18 | + |
| 19 | +### Arduino IDE |
| 20 | + |
| 21 | +1. Install the Arduino IDE from the [official Arduino website](https://www.arduino.cc/en/software). |
| 22 | +2. Open the Arduino IDE. |
| 23 | +3. Go to **Sketch > Include Library > Manage Libraries**. |
| 24 | +4. In the Library Manager, search for "Alvik" and install the latest version of the Alvik library. |
| 25 | + |
| 26 | +### Firmware Preparation |
| 27 | + |
| 28 | +#### Preparing Alvik for Arduino IDE |
| 29 | + |
| 30 | +1. Connect pin **B1** to **GND** on the Alvik board. |
| 31 | + |
| 32 | +2. Connect the Alvik board to your computer using the USB cable. |
| 33 | +3. Open the **Blink** example in the Arduino IDE by going to **File > Examples > 01.Basics > Blink**. |
| 34 | + |
| 35 | +4. Select **esptool** as the programmer from the **Tools > Programmer** menu. |
| 36 | + |
| 37 | +5. Select **Upload Using Programmer** from the **Sketch** menu. |
| 38 | + |
| 39 | +6. Your board should now be restored and ready for programming with the Arduino IDE. |
| 40 | + |
| 41 | +#### Preparing Alvik for MicroPython |
| 42 | + |
| 43 | +1. Install the micropython bootloader on it following [this guide](https://docs.arduino.cc/micropython/basics/board-installation/). |
| 44 | + |
| 45 | +2. Download the Alvik micropyton libraries |
| 46 | +Alvik micropython libraries from the [Alvik repository](https://github.com/arduino/arduino-alvik-mpy/tree/main) |
| 47 | +ucPack libraries from the [ucPack repository](https://github.com/arduino/ucPack-mpy/tree/main) |
| 48 | +3. Unzip both of the downloaded libraries in a single "Alvik" folder, open the Arduino Lab for MicroPython, go to the "files" tab and set the path to the unzipped folder on the Arduino Lab for Micropython |
| 49 | +  |
| 50 | +4. Make sure your Alvik is OFF, connect it to your computer and then, turn it ON |
| 51 | +  |
| 52 | +5. Connect your Alvik to the Arduino Labs for micropython and open the "lib" |
| 53 | +  |
| 54 | +6. Select the "Arduino-alvik" and move it inside the "lib" folder in your Alvik. |
| 55 | +  |
| 56 | +7. Go back to the main folder and select the "ucPack-mpy-main" folder and move it next to the arduino_alvik inside the "lib" folder in your Nano ESP32. |
| 57 | +  |
| 58 | +8. Now go back to the main root of the files system on the Nano ESP32. Then in your local folder navigate to the examples folder once there, select the following files and move them to the main folder of the ESP32. |
| 59 | + `demo.py` |
| 60 | + `hand_follower.py` |
| 61 | + `line_follower.py` |
| 62 | + `main.py` |
| 63 | + `touch_move.py` |
| 64 | + |
| 65 | +  |
| 66 | +With this last step, your Nano ESP32 has been set up with the Alvik out of the box experience and is ready to be used. |
| 67 | + |
| 68 | + |
| 69 | +## Programming Alvik |
| 70 | + |
| 71 | +1. Start with a simple example, like blinking an LED or reading a sensor. |
| 72 | +2. Use the Alvik library functions to interact with the robot's hardware. |
| 73 | +3. Upload your sketch to see it in action. |
| 74 | +4. Explore the included examples in the Alvik library to learn how to control motors, read sensors, and more. |
| 75 | + |
| 76 | +## More Resources (C++) |
| 77 | + |
| 78 | +- **Alvik Documentation**: Dive deeper into the capabilities of Alvik by exploring the official documentation. |
| 79 | +- **Community Forums**: Join the Arduino community forums to ask questions and share your projects. |
| 80 | +- **Tutorials and Projects**: Look for tutorials and project ideas that can inspire your next steps with Alvik. |
0 commit comments