Attiny404 firmware for thermostat usage
Go to file
jakeg00dwin 4a6a9e34df Updated the documentation version 2024-10-19 00:35:02 -07:00
.generated_files/flags/attiny404 MPLABX 2024-09-23 13:15:38 -07:00
debug/attiny404/queuelogs MPLABX 2024-09-24 16:55:50 -07:00
dist MPLABX IDE updates 2024-10-18 23:09:25 -07:00
inc Updated the config.h with more code comments. 2024-10-19 00:31:54 -07:00
mocks returning the actual value from the mock. 2024-10-18 21:42:29 -07:00
nbproject MPLABX 2024-09-24 16:55:50 -07:00
queuelogs Initial Commit of Existing code 2024-09-18 12:48:01 -07:00
src removed now unused static function, `is_below_target()` 2024-10-18 23:08:03 -07:00
tests Added more port b tests 2024-10-18 22:15:22 -07:00
.gitignore Added the cache as somethign to ignore. 2024-09-20 18:19:58 -07:00
CMakeLists.txt Initial Commit of Existing code 2024-09-18 12:48:01 -07:00
Doxyfile Updated the documentation version 2024-10-19 00:35:02 -07:00
README.md removed now uneeded roadmap section. 2024-09-23 11:53:12 -07:00
avr-gcc-toolchain.cmake Initial Commit of Existing code 2024-09-18 12:48:01 -07:00
defmplabxtrace.log Initial Commit of Existing code 2024-09-18 12:48:01 -07:00
defmplabxtrace.log.inx Initial Commit of Existing code 2024-09-18 12:48:01 -07:00
otto.sh commit of formattting 2024-09-18 12:48:41 -07:00
setup.sh commit of formattting 2024-09-18 12:48:41 -07:00

README.md

Themostat Firmware

Description

This embedded firmware is the thermostat mode.

Micro Controller Pins

ATtiny404

  1. VDD(+5v)
  2. PA4(ADC_LOAD1)
  3. PA5(ADC_LOAD2)
  4. PA6(ADC_LOAD3)
  5. PA7(zerocrossing)
  6. PB3(EN2)
  7. PB2(EN3)
  8. PB1(SDA)
  9. PB0(SCL)
  10. RST(NC)
  11. PA1(G1)
  12. PA2(EN1)
  13. PA3(NC)
  14. VSS(GND)

key NC:: Not Connected PBX:: Port B pin X PAX:: Port A pin X RST:: Reset pin

Project Layout

Tree -L 1, output

.
├── avr-gcc-toolchain.cmake
├── build
├── CMakeLists.txt
├── compile_commands.json -> ./build/compile_commands.json
├── docs
├── Doxyfile
├── inc
├── mocks
├── otto.sh
├── README.md
├── setup.sh
├── src
└── tests

6 directories, 7 files

The source code required to run/build the project is in the /src directory, with the headers residing inside the /inc directory for most public modules.

All other directories are for supporting the development cycle and are used for testitng the code base to ensure accuracy and quality. These are contained in the tests and mocks directories.

Documentation that has been generated is inside the docs folder which contains the html output that can be browswed via your regular web browser.

PDF genreation from the doumentaiton is also possible if enabled through the Doxyfile inside the projects root directory.

The build directory contains the output and makefiles genrerated automatically when using CMake.

This build directory also holds the bin files genreated along with the hex and elf files.

Build Requirements

  • AVR-GCC toolchain OR XC8 from microchip.
  • Make OR CMAKE
  • avrdude
  • A AVR programmer, usbasp for older chips and UPDI for newer ones.

Dev Requirements

  • ATtiny404 series micro-controller
  • AVR-GCC toolchain.
  • Cmake
  • cpputest(Unit testing harness.)
  • Doxygen(For documentation)
  • Git(For version control)

Running Unit Tests

To run the cppunit tests you can use the included shell script inside a bash shell.

echo "1" | ./otto.sh

The command runs the otto script which automates parts of the development cycle such as running and building tests, compiling hex files and flashing the code to a micro-controller using arvdude.