Let's Make Robots!

XMOS - Tutorials

My XMOS entry was to create tutorials that not only taught how to use the XMOS but also lead up to explaining complicated robotic principles as well as good coding standards. So far I have been trying to figure out what to make a tutorial about. Below is my list which I will add or subtract from depending on the XK1's capabilities and the complexity of the tutorial. My goal is to break them into small chunks that can be digested in less than 30 minutes (5-10 minutes of first read through followed by some do it yourself time and possibly another 10-20 minutes of re-reading for comprehension). Here is the list. Feel free to make suggestions if something you have learned or want to learn isn't included.

  1. Hook up the XMOS and get an LED blinking
  2. Flash LED in morse code "SOS"
  3. LEDs doing 8-bit binary counting
  4. LED Dice
  5. 7 segment LED display (7 LEDs to display a grapical representation of a 1 digit #)
  6. Servo and motor introductions
  7. Motor Driver introduction
  8. Motor Driver w/ second power source (possible first robot to drive around)
  9. Ultrasonic and IR rangefinders to make project above not run into stuff
  10. Line Sensors to make robot above follow a line
  11. Make your own h bridge and use as a motor driver
  12. PWM -software and hardware
  13. Charlieplexing
  14. Encoder beginner
  15. Encoders Quadrature
  16. P Control
  17. PI Control
  18. PID Control
  19. Localization
  20. Wave Front

Along the way items such as resistors, capacitors, transistors and OHMs law will be covered as well as I can explain it. I am a CS guy not an EE so I will need help from others to ensure I am explaining things in a way that is accurate ;) My #1 goal is to teach the above principals as well as good coding standards, the electrical stuff will be explained the best I can...

My hope is to duplicate the tutorials using an Arduino Mega and Picaxe where possible. Picaxe may not handle wave front, quadrature, etc.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I think you're thinking of the Odometer in a car, which displays miles (or kilometers) travelled. The tachometer displays engine revolutions per minute.

S'okay though, I still get the movie reference ;)

Yup sorry I blame the nyquil.


NyQuil NyQuil NyQuil, we love you, you giant f---ing Q!!!

A regular encoder has one "eye", and can count how many times the first disc transitions between light and dark (basically). By knowing the diameter of your wheel, and how many ticks are in one rotation, you can effectively measure how far the wheel has travelled.

A quadrature encoder has two eyes mounted 90 degrees out of phase, and a properly designed encoder disc, so if one eye is seeing light, the other _has_ to be seeing dark. By paying attention (in your code) to the last known state and comparing it to current state you can tell which direction the wheel is turning, in addition to math-ing out how far the wheel has travelled.

Your first image will (should) work for either quad or non-quad encoders, both of which (I think) are "incremental" encoders.

Your description of your second image is dead on. I think it's called an "absolute" encoder.

Seems I learned something new today :)
I need servos tutorial, gpps tutorial, usb datalogger, gyro/accellerometer, ping, Pob-Eye, and TPA 81 tutorials knowledge. Which ones apply?

I'll be interested in some of these and how you accomplish some of them, like the pwm. I'm using pwm and have an idea of how I can accomplish what I need to, but not sure if what I'll be doing is the best way...  :D

 btw, I know that there is a uart tutorial, but I wonder if you were maybe looking at expanding it?


This is a great project and I`m looking forward to seeing what you come up with. As I`m still learning the XK1s ins and outs for my own project I wish you had started 6 months ago ;)

Collected! :D