We Are Intel
Learn about Intel culture and the individuals who do something wonderful everyday
1008 Discussions

Gearing Up for Comp Sci Education Week

We_Are_Intel1
Employee
0 0 175

5 Days of Coding


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:

  • Computer

  • 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.

Let’s go!

  • 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

https://vimeo.com/album/4291241/video/194377260

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

https://vimeo.com/album/4291241/video/194377325

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

https://vimeo.com/album/4291241/video/194377394

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

https://vimeo.com/album/4291241/video/194377472

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

https://vimeo.com/album/4291241/video/194377541

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.

For additional more specs on this project go to Hackster.io.

Troubleshooting Guide:

Problem:

Sketch not working


Resolution:

  1. Check Arduino IDE set to correct model, and Port

  2. Check Arduino101 Port visible in Arduino IDE

  3. Try resolution for port not visible


Problem:

Arduino101 port not visible in Arduino IDE


Resolution:

  1. Unplug all USB

  2. Unplug and replug power

  3. Replug all USB

  4. Wait

  5. If not visible after 2.5 minutes, reboot PC and repeat steps 1-4.


Problem:

Sketch upload complains about DFU


Resolution:

  • 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


Problem:

Sketch upload complains about missing libraries


Resolution:

  1. Install libraries in appendix

  2. Restart Arduino IDE

About the Author
We make the impossible possible and empower millions around the world through great technology, good corporate citizenship, and inclusive culture. We are Intel, and these are our stories.