Check the presentation and the amazing music video at 23:00 ! Music by @llogiq
Working with Rahix's avr-hal to make a little robot 🚗🐯 with 📡.
The circuit diagram is below:
If you are not used to/have no access to cheap electronic parts: 🛍🛒 You can also order a kit from Banggood or Ebay. Just search 2WD obstacle avoiding robot kit, there are many, many, many suppliers. Example: Ebay UK, Banggood... Also, there are great tutorials on assembling those robots!
If you love picking up electronics yourself:
- Arduino UNO or Nano, or any clone using ATmega328p
- Servo SG90
- 2 DC motors 12V
- Motordriver with H-bridge L298N
- Sensor HC-SR04
- cables, jumpers, breadboards.
-
Install avrdude. It's the utility to write in the ROM(read only memory) or the EEPROM (electrically erasable programmable read-only memory) of AVR microcontrollers. atmega328p, on the arduino uno is from this familly. When you'll run the file, the executable file will be in target/avr-atmega328p/debug/.elf
-
Compile the project, or modify the executable flash_it.sh if you want to use it. It contains those lines:
// build in nightly
set -e cargo +nightly build
// burn on the board
avrdude -p atmega328p -c arduino -P /dev/tty.<your usb> -U flash:w:target/avr-atmega328p/debug/<name of the project>.elf:e
// can be removed, used to check the console on mac.
screen /dev/tty.<your usb> 57600
set -e
is a bash command that will prevent your board to be flashed if an error is returned by cargo.
You flash on the board with avrdude with your usb serial and your own elf file. You can get your USB with ls /dev/tty* | grep usb
.
-p
is "partno": the only mandatory option, tells avrdude what type of MCU is connected to the programmer-c
gives the programmer id from a list (luckily arduino is super common)-U
: perform a memory operation The screen command allows to see the console.57600
is the baud rate, other established baud rates as `9600 are possible, but then you would need to change the program)
3. you can now run ./flash_it.sh and have the car running (hopefully).