Skip to content

Commit 5867af8

Browse files
Added page for C++
1 parent 8f9b97e commit 5867af8

File tree

7 files changed

+84
-2
lines changed

7 files changed

+84
-2
lines changed

content/hardware/08.edu/solution-and-kits/alvik/tutorials/api-overview/api-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ hardware:
1313
## API List
1414

1515
To access to any of these functions you need first to initialize an instance of the class **ArduinoAlvik()**.
16-
16+
This reference is usefull for both MicroPython and C++ enviroments as the functions were all created to have the same form across development enviroments meaning your experience should be easy to carry both options.
1717

1818
```arduino
1919
alvik = ArduinoAlvik()
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
![B1 and GND pins](assets/nano-esp32-gnd-b1.png)
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+
![alt text](assets/blinkExample.png)
35+
4. Select **esptool** as the programmer from the **Tools > Programmer** menu.
36+
![alt text](assets/EsptoolSelection.png)
37+
5. Select **Upload Using Programmer** from the **Sketch** menu.
38+
![alt text](assets/UploadWithProgrammer.png)
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+
![Setting the FW path on the Labs for micropython](assets/fw_path.png)
50+
4. Make sure your Alvik is OFF, connect it to your computer and then, turn it ON
51+
![Alvik USB Connection](assets/connecting-final.gif)
52+
5. Connect your Alvik to the Arduino Labs for micropython and open the "lib"
53+
![Setting the FW path on the Labs for micropython](assets/lib_folder.png)
54+
6. Select the "Arduino-alvik" and move it inside the "lib" folder in your Alvik.
55+
![Setting the FW path on the Labs for micropython](assets/moving_alvik_folder.png)
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+
![Setting the FW path on the Labs for micropython](assets/moving_ucPack.png)
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+
![Setting the FW path on the Labs for micropython](assets/moving_examples.png)
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.

content/hardware/08.edu/solution-and-kits/alvik/tutorials/getting-started/getting-started.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ Now that you have played with Alvik and have seen it moving, it is time to know
2929

3030
### Let's Start Coding Alvik
3131

32-
Alvik is intended to be programmed with MicroPyton. We recommend you to install the [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) editor. Follow the instructions next to the download link to install it and open the IDE
32+
Alvik is intended to be programmed with MicroPyton. We recommend you to install the [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) editor. Follow the instructions next to the download link to install it and open the IDE.
33+
34+
Alternatively, on par with other Arduino products, you can also program your Alvik using Arduino IDE and C++. If this is the case you can find setup instructions over at [Arduino Alvik C++ Tutorial](getting-started.md).
3335

3436
Now that all the previous steps have been set, let's see how to make Alvik moving across your room while avoiding objects! Let's create custom program for Alvik that:
3537

0 commit comments

Comments
 (0)