5 Days of Coding
Building a rover with Intel and Arduino 101*
At Intel, we believe there’s an innovator in all of us. This week, December 4-10, is Computer Science Education Week, which recognizes that every person should have access to computer science education and the amazing experiences made possible through technology. In celebration of #CSEdWeek, we invite you to gain a few impressive coding skills with our Hour of Code project – building a self-driving rover!
The short, easy-to-understand video tutorials and steps below will guide you through the process of creating and programming your very own autonomous rover using an Arduino 101* board. It’s a fun and simple project sure to inspire the innovator inside.
Ready to explore the world of programming? Here’s what you’ll need to get started:
- Arduino 101 board
- USB cable
- LED light bulb
- Grove kit (or shield and button)
- Assembled rover kit
- Proximity sensor
Remember, if you ever feel daunted just watch the daily videos and review the detailed instructions below.
First, a little about the board itself. Flexible, versatile and approachable even for a beginner, the easy-to-use Arduino 101 is a learning and development board that contains the Intel® Curie™ Module. It combines low-power consumption with high performance and makes creating projects simple. In this section, we’re going to walk you through downloading the appropriate software, teach you a basic programming language, program the board to “BLINK” and attach a LED light.
- Download the Arduino software
- Once the software is downloaded, click on the Arduino.exe, and you’ll see the programming software environment
- Go into the software, find Examples > 01.Basics > Blink
- Click on Tools > Board > and select Arduino 101 to make sure that the board is connected and board and ports are set to Arduino 101
- Connect the Arduino 101 board to the computer via USB cord
- Click the upload button, to load the program onto the board (board will blink)
- Add the LED light bulb (long end in port 13, the other in ground)
Great work. Now the Arduino 101 board is connected to your computer and you’ve been introduced to a basic “BLINK” program. Watch how it’s done:
EPISODE 1 VIDEO
Ready to learn how to turn on and off the LED light with a button sensor? For this section, you’ll need a shield, a button, a cable and an LED light bulb. We recommend this Grove kit, which includes everything.
Connecting Button LED for manual control:
- Connect the Arduino 101 to the computer via USB
- Attach one end of the cable to port D4 on the shield and the other end to the button sensor
- Attach the LED light bulb to the shield (long end in port 13, the other in ground)
- Connect the shield to the Arduino 101
- Launch the software if it’s not already open, Arduino.exe
- Go to File > Examples > CurieBLE > Button LED
- Click the Upload button
Now, try the button. When you click and release, you should see the LED light up when you press. Watch how it’s done:
EPISODE 2 VIDEO
At this point the software is launched and the board, shield, and button should already be connected to your computer. You’re able to manually control the LED light. The following step will enable you to turn on and off the LED light with a smartphone or tablet, so you’ll need an Android or iOS device.
Connect and control with Bluetooth:
- Download the nRF Connect app onto an Androidor iOS device
- Launch app, swipe through all the intro panels and press the Scan button
- Press the Connect button next to the device “ButtonLED”
- Select Unknown Service
- Touch the up arrow
- Make sure date type is Byte
- Enter 01 for Byte data, and hit Send to set the virtual button on (light turns on)
- Enter 00 for Byte data, and hit Send to set the virtual button off (light turns off)
Any questions on that last section? Watch how it’s done:
EPISODE 3 VIDEO
You’re over halfway there! Next up, we’ll show you how to connect and to control a more complex device like a 4WD rover via smartphone or tablet. For this section, you’ll need an assembled rover kit (such as this one or this one) and an Android or iOS device.
Connect and control the rover:
- Download the two “Arduino 101 BLE Rover” projectsfrom Hackster.io
- Connect the Arduino 101 on the rover to the computer
- Launch Arduino.exe
- Click Upload button to upload the BLE Rover projects
- Download the nRFToolbox for BLE on the Android or iOS device
- Launch the app
- Select UART
- Click Edit to modify the layout so you can control the rover the way you want.
- Click Done when complete
- Click Connect
- Unplug the rover from the computer and take it for a spin
You can press any button icon to control the rover. Watch how it’s done:
EPISODE 4 VIDEO
You’ve made it from making a light blink on the Arduino board to controlling a rover with your smartphone or tablet. Nice work!
Time for the finishing touch, programming your rover to drive autonomously. We’re going to guide you through adding a proximity sensor to the rover so it can detect and avoid obstacles. For the final step, you’ll need the proximity sensor, cable and Android or iOS device.
Bluetooth Smart Autonomous Rover and Arduino101”
- Locate the base shield on the rover
- Use the cable to connect the proximity sensor to port A0 on the shield
- Mount the proximity sensor on the front of the rover
- Launch the app nRF Toolbox for BLE
- Select UART
- Select Edit to modify the layout
- Add a Play button to the control layout
- Click Done when finished
- Click Connect
- Press the Play button to turn on autonomous mode
And you’re ready to roll! Watch how it’s done:
EPISODE 5 VIDEO
Did you get stuck anywhere? Check out this code guide and additional instructions here: Arduino101 BLE Autonomous Rover.
We hope you enjoyed this coding tutorial and that you’ll use these skills to create even more amazing things. We can’t wait to see what you’ll do next.
Sketch not working
- Check Arduino IDE set to correct model, and Port
- Check Arduino101 Port visible in Arduino IDE
- Try resolution for port not visible
Arduino101 port not visible in Arduino IDE
- Unplug all USB
- Unplug and replug power
- Replug all USB
- If not visible after 2.5 minutes, reboot PC and repeat steps 1-4.
Sketch upload complains about DFU
- The flashing rules may need to be created:
- sudo usermod –a –G tty <username>
- sudo usermod –a –G dialout <username>
- cd ~/.arduino15/packages/Intel/tools/arduino101load/1.6.9+1.24/scripts
- sudo ./create_dfu_udev_rule
Sketch upload complains about missing libraries
- Install libraries in appendix
- Restart Arduino IDE