generated from TDD-Templates/cmake_cpputest_template_avr
1.8 KiB
1.8 KiB
Motorized Fader
Description
Program for the ATtiny13A that controls a motorized fader by moving into a saved position read out of EEPROM memory.
Requirements
Hadware:
- ATtiny13A/ATtiny45/ATtiny85.
- usbasp programmer.
- UNIX computer(to use the scripts for automation).
Software:
- avr-gcc
- avrdude(<=7.0)
- CMAKE(<= 3.20)
Instructions(Windows)
Flashing the Project
On Windows(usbtinyisp)
- Install the usbtiny driver:
- plug in usbtiny device
- Install the drivers from: adafruit
- open Powershell
- navigate to the repo directory cd Downloads\gf_002
- enter the command below.
./avrdude.exe -p t13 -c usbtiny -B 125kHz -U flash:w:.\pre_built\attiny13_6-9Mhz.hex -U lfuse:w:0x6A:m -U hfuse:w:0xFF:m -U lock:w:0xFF:m
On Windows(usbASP)
- Install the usbasp driver:
- plug in usbasp device
- run the 'zadig-2.8.exe' program
- select the libusb 32 on the right by clicking the down arrow to select.
- open Powershell
- navigate to the repo directory cd Downloads\gf_002
- enter the command below.
./avrdude.exe -p t13 -c usbasp -B 125kHz -U flash:w:.\pre_built\attiny13_6-9Mhz.hex -U lfuse:w:0x6A:m -U hfuse:w:0xFF:m -U lock:w:0xFF:m
Instructions(UNIX)
Building Hex Files
Builds the binary hex files. They are located in the build/src/
directory
found in the project root.
cd ./<PROJECTNAME>
echo "2" | ./otto.sh
Automated Flashing Hex Files
Builds then flashes the binary hex files onto the micro-controller
cd ./<PROJECTNAME>
echo "4" | ./otto.sh
Running Tests
The code below will run the cpputest tests in verbose and color mode.
cd ./<PROJECTNAME>
echo "1" | ./otto.sh