6 Commits

Author SHA1 Message Date
jonny_ji7
06451b47d0 Add 'buzzer.hpp, buzzer.cpp' Add instance 'button'
- Copy buzzer function from gate project
  this makes it possible to easily trigger and queue up buzzing events
  without having to worry about delaying the program
- Add instance buzzer to config
- Add code for testing the buzzer to main.cpp
2022-06-10 08:40:46 +02:00
jonny_ji7
4eb1c5d43a Create class 'evaluatedJoystick'
- Create class 'evaluatedJoystick'
  - evaluates a joystick with 2 analog signals
  - scales the adc input to coordinates with detailed tolerances
  - calculates angle and radius
  - defines an enum with position information
- Add joystick configuration and class instance to config.cpp
- Add code for testing the new class to main.cpp
- Add joystick.cpp to cmakelists

now function `joystick.getData` can be used globally to obtain a struct with
current position data of the joystick
2022-06-08 19:50:17 +02:00
jonny_ji7
84bfe211ac Create class 'controlledMotor', Create config
- Create class 'controlledMotor':
  - handles 'fading / ramp' of the pwm duty
  - handles current limit **not implemented yet**
  - has .handle function that is intended to be run very fast in another task
    commands are sent via queue

- Create config.hpp
  - Globally available instance motorLeft of controlledMotor class
- Create config.cpp
  - Configuration of motordriver and control parameters for motorLeft

- Add config.cpp and motorctl.cpp to cmakelists

- main.cpp:
  - create 'task_motorctl' which repeatedly runs motorLeft.handle()
  - modify testing code for testing the new class
  - comments

The fading/ramp capability of the new class was tested successfully
using a breakoutboard with an led.
2022-06-05 16:36:57 +02:00
jonny_ji7
b0d0b568a3 Create driver for 'single100a h-bridge'
- create class 'single100a' in motordrivers.hpp and motordrivers.cpp
- add code for testing the driver in main.cpp (test with led was successful)
- update cmakelists, to also compile the new .cpp file
2022-06-04 18:17:44 +02:00
jonny_ji7
37e9048daa Changes for C++ support, Add gitigore
- extern C around libraries and main function
- Include common libraries
- Create gitignore
2022-06-04 18:17:44 +02:00
jonny_ji7
ffb415fb11 init (esp-idf sample_project)
Rewrite of firmware controlling an electric armchair (previous firmware
developed 2019-2021)

- Init esp-idf project: with esp-idf version v4.4.1 installed ran command `idf.py create-project
armchair`

- Add connection plan from old repo
2022-06-04 18:17:15 +02:00