Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# Sim Racing Pedals A Sim Racing Pedals controller that supports: Onboard ADC, ADS1115, HX711 Supports YD RP2040 (Pi Pico) Build with platformio When DEBUG is set The serial monitor shows the Pedal outputs, eg: ``` Accelerator - 0 %, Raw: 6264, Min: 6249, Max: 8696, Range: 2447 Brake - 0 %, Raw: 2653, Min: 2615, Max: 2698, Range: 83 Clutch - 0 %, Raw: 4578, Min: 4562, Max: 4580, Range: 18 ``` Press the Pedals in full once and Min and Max are the values set in `main.cpp` ```cpp pedal_array.push_back(std::make_unique<ADS1X15> (pedalType::ACCELERATOR, 0, 1023, 620, 0.00, 0.04)); pedal_array.push_back(std::make_unique<HX711Pedal> (pedalType::BRAKE, 16, 17, 0, 220, 0.05, 0.05)); pedal_array.push_back(std::make_unique<AnalogPedal> (pedalType::CLUTCH, 28, 1023, 530, 0.00, 0.04)); ``` Define your pedals by `push_back`ing onto `pedal_array` in `setup()` The constructors are similar, you define the `pedalType::`, pin/ADS channel (or data, clock pins of HX711), Start Raw Value, End Raw Value, Start Deadzone, End Deadzone when LED is set The YD RP2040's Neopixel is used to show inputs of the Pedals, helpful to debug when something is wrong. - Green for Accelerator - Red for Brake - Blue for Clutch