Robotics Kit Workshop


Workshop for how to use and control Servo and Temperature Robotics

instructions

Robotics Workshop: using Temperature sensor to control Robotics Servo

Welcome to our session! If you have any questions, please ask us. We are here to help.

In this session we'll work through 4 examples together. We will demonstrate everything, but this document should help you in case you're stuck. We also have optional sections in case you want to go further.

If you happen to be much faster than everyone else, help your neighbors.

Setup

  1. Connect the Temperature sensor as well as the Servo to the Seeeduino-Arch-Link board, and then connect the board to you PC using the micro-USB cable.
  2. The board mounts as a mass-storage device (like a USB drive). Verify that you can see it (drive name will be MBED).
  3. Go to http://developer.mbed.org
  4. Create an ARM mbed account if you do not have one.
  5. On the top right corner, click the Compiler button.

An IDE should open. Congratulations!

On Windows: To see debug messages, install the serial driver.

Debug messages: We can talk to the board via a serial port, but you might need some software. Read this doc and install required software (like PuTTY or CoolTermon Windows).

Locally: If you like things locally, you can do so by exporting to a supported toolchain.

I very much recommend to just use the online IDE, as it makes it easier for us, but if you want to continue hacking in the future, this is a nice way.

Program1_Blinky

  1. First we need to set up our project and our target. In a new browser window, open https://developer.mbed.org/platforms/Seeed-Arch-Link and click the Add to your mbed Compiler button.
  2. Go back to the compiler browser window and click F5 to refresh the page.
  3. Click the Import button, then click "Click Here to import from URL"
  4. Paste the URL https://developer.mbed.org/teams/Robotics-Kit-Workshop/code/Program1_Blinky/
  5. Double click to open main.cpp
  6. Try to finish the code under ' YOUR CODE HERE : turn on the LED'
  1. Now press Compile
  2. A file downloads (Program1_Blinky.bin)
  3. Drag the file to the 'MBED' disk
  4. The LED on the board will flash.
  5. After flashing, hit the 'Reset' button to start the program.
  6. Program1_Blinky runs!

Program2_TempAndHumidity

  1. Now import https://developer.mbed.org/teams/Robotics-Kit-Workshop/code/Program2_TempAndHumidity/
  2. Open main.cpp
  3. We are trying to get the temperature and humidity from the sensor
  4. Try to finish the code under ' YOUR CODE HERE: read the temperature and humidity
  1. Hit the Compile button and flash the application.
  2. With the program running successfully, we can see the temperature and humidity information printed on the terminal (CoolTerm / TeraTerm/ Putty)

Program3_Servo

  1. Now import https://developer.mbed.org/teams/Robotics-Kit-Workshop/code/Program3_Servo/
  2. Here we try to present you how to control the Servo
  3. Try to finish the code under ' YOUR CODE HERE : make code run between 0-1 only!' for challenge!
  1. Compile, Flash, Reset, the servo will now move!

Program4_ServoWithTempAndHumidity

  1. Now import https://developer.mbed.org/teams/Robotics-Kit-Workshop/code/Program4_ServoWithTempAndHumidity/
  2. Here we intend to control the servo with temp & humidity
  3. Try to finish the code under' YOUR CODE HERE: to reverse myservo between 0 and 1 '
  1. Compile, Flash, Reset, now the servo will move based on the temperature reading! Try putting your finger on the temperature sensor to see it move!

All wikipages