American Truck Simulator

I am a huge fan of American Truck Simulator and really enjoy playing it on my MacBook. Over the last year I have looked into the possibility of buying a steering wheel / pedal kit for my Mac. The more I looked into it the less satisfied I got. I really wanted the tactile feel of actually pressing buttons and operating clunky switches to make things happen in ATS.

My philosophy here at the Maker Cupboard (and more generally in life) is if the product doesn't exist (or if I can't afford it) then make my own one.

After a few failed attempts (particularly around Bluetooth) I eventually settled on making a device which emulated a USB keyboard.

The core of the project is the Sparkfun Arduino 5V pro Micro controller. This was the perfect device as it can easily emulate a USB HID keyboard.


This was relatively easy to program and my code was based on an example by Jim Lindblom from SparkFun Electronics and made use of the Keyboard.write() and function.

My full code can be found here and hopefully with the comments it should be clear which button is connected to which pin.

At the moment I have used a bit of a cheat with the analogue read of the joy stick. Essentially any upward movement will send a single character for accelerate and decelerate for downward movement. The amount of upward movement doesn't change the speed but I will be addressing this when I get a little bit more time to work on it.

I bought a very cheap barrel switch which controls the digital switches by breaking the connection from the common ground to the board. The analogue switch needs to remain connected to ground otherwise it sends a false signal.

My next step will also be to use a rotary encoder to build a basic steering wheel.



37 sensor kit

sensor title

I was given the 37 Sensor Kit from for Christmas and I think that this will be a lot of fun.

This is a really well presented box containing 37 sensors ranging from a Joystick to IR Emitters and Receivers.

sensor CD

sensor box

Accompanying the box is a CD (shown above) which contains:

  • PDF workbook laid out in a lesson per sensor. This is very comprehensive and definitely would be good for a beginner or someone taking their first steps in physical computing / project making. A schematic diagram is included for every sensor along with relevant theory about how the sensor works.
  • Libraries - Any additional Arduino libraries are included on the CD in a handy zip format which are very easy to import.
  • Code - example code for every sensor to get you started with your first projects.


Overall this is a great project kit and I personally think excellent value for money.

I will post project write-ups of the great things I build with it here


neopixel snowman


In building this project I followed the very comprehensive guide from Adafruit on working with RGB neopixels. The guide is very detailed and includes all you need to get started with lengths of spare RGB neopixel strips. Read it here.

I have included the schematic from Adafruit below. I am powering the Arduino (Orangepip Kona328) from a 12V power supply and using the Vin pin on the board for the 12V power supply for the LED strips. Due to the larger currents needed to drive the LEDs I followed the recommendations of using a power NPN transistor with each colour channel. I bought a handful of TIP120 Power Darlington Transistors for less than a £1 each.

I built the circuit as shown below (Attribution-ShareAlike Creative Commons -, owner Tyler Cooper) and used their sample code below.


I made a simple little case to hide the Kona328 and the transistors. There is very little heat produced by either the board or the transistors and I have left the snowman running all day. With any home made project I won't be leaving it switched on over night.


  1. // in the #defines
  2. // public domain, enjoy!
  3. #define REDPIN 5
  4. #define GREENPIN 6
  5. #define BLUEPIN 3
  6. #define FADESPEED 5 // make this higher to slow down
  7. void setup() {
  8. pinMode(REDPIN, OUTPUT);
  9. pinMode(GREENPIN, OUTPUT);
  10. pinMode(BLUEPIN, OUTPUT);
  11. }
  12. void loop() {
  13. int r, g, b;
  14. // fade from blue to violet
  15. for (r = 0; r < 256; r++) {
  16. analogWrite(REDPIN, r);
  17. delay(FADESPEED);
  18. }
  19. // fade from violet to red
  20. for (b = 255; b > 0; b--) {
  21. analogWrite(BLUEPIN, b);
  22. delay(FADESPEED);
  23. }
  24. // fade from red to yellow
  25. for (g = 0; g < 256; g++) {
  26. analogWrite(GREENPIN, g);
  27. delay(FADESPEED);
  28. }
  29. // fade from yellow to green
  30. for (r = 255; r > 0; r--) {
  31. analogWrite(REDPIN, r);
  32. delay(FADESPEED);
  33. }
  34. // fade from green to teal
  35. for (b = 0; b < 256; b++) {
  36. analogWrite(BLUEPIN, b);
  37. delay(FADESPEED);
  38. }
  39. // fade from teal to blue
  40. for (g = 255; g > 0; g--) {
  41. analogWrite(GREENPIN, g);
  42. delay(FADESPEED);
  43. }
  44. }