9 Commits

Author SHA1 Message Date
jonny_ji7
d2d85952df Add evalSwitch instance for sw on adc (testing)
Test all new changes in switchesAnalog and evaluatedSwitch
2022-09-12 09:58:08 +02:00
jonny_ji7
09ee67f583 Add code for demuxing 4 switch signals from adc pin
- create new files with code for demultiplexing the 4 switches from the
  one analog signal
- define lookup table with measurements done with the build pcb, test
  switches and esp32 breakout board
- add note do config that gpio used for digital in is now used for
  this multiplexer
- main.cpp: disable control task, run new handle function in a loop for
  testing
2022-09-11 19:58:13 +02:00
jonny_l480
248668c526 Add encoder-test, calibrate distance conversion
Add encoder test:
  - used for calibrating the length measurement by counting the steps
    per meter
  - enabled with #define ENCODER_TEST  in config.hpp
  - display1: enocder steps
  - display2: converted length in meter

Distance conversion:
  - defining STEPS_PER_METER instead of MEASURING_ROLL_DIAMETER in
    config.hpp
  - defining the steps per meter by issuing 3 test measurements with
    4mm2 solar cable in the new encoder test mode
2022-08-26 13:24:51 +02:00
jonny_ji7
9d416d29e6 Switch from 7.5kw vfd to 700W vfd
Already switched earlier, now optimized code and connection plan to work
best with new vfd (T130750W).
Previous 7.5kw vfd will work too without using all 7 speed levels as at
first.

connection plan: changed pin assignment (1 free pin)

Code:
  - vfd.cpp, main.cpp: remove not used D2 pin (only used with 7.5kw vfd)
  - config.hpp: change pin assignment
2022-08-26 11:24:27 +02:00
jonny_l480
5ddf8699e2 Change wheel diameter (larger wheel v3) 2022-08-20 14:17:40 +02:00
jonny_ji7
dddd54b03a Add MANUAL mode, Add vfd direction support
vfd: extend vfd_setState function with direction enum (default fwd)
main: reduce log output from buzzer task
config: use mos1 as vfd_FWD output
control:
    add MANUAL state: motor can be controlled via preset buttons
    adjust code slightly to support new state (also see updated
    function-diagram)
2022-08-19 16:29:59 +02:00
jonny_ji7
0aea494783 Add poti and display section; Cleanup
Add readadc function from armchair project
Rework display section
   - show lengthNow on first display
   - show lengthTarget on second display
Prepare for statemachine

Remove unneeded function
Add comments improve structure
2022-08-18 12:46:08 +02:00
jonny_ji7
22f8aef8d2 Move code from main to control.cpp, display pages
- move code from testing task to control.cpp
- outsource functions for initializing display and encoder
- delete testing code
- add two display pages (current distance and counter)
- run handle functions for each button
2022-08-17 13:08:05 +02:00
jonny_ji7
a3f3cb340c Add config, buzzer, evalSwitch, switch to c++
Add config.cpp/hpp
    - macros for all input and output pins
    - gloabl evaluated switch objects
    - buzzer object
    - display config
    - encoder config

Move main.c to main.cpp and adjust code to be c++ compatible

add custom library evaluated switch (copied from armchair project)
add buzzer object (copied from armchair project)

add control.cpp/hpp with control task (no function yet)
2022-08-17 10:29:11 +02:00