SBB Micro
Source code for the self-balancing-bike microcontroller unit (Teensy 4.1-based). 🚀️
Loading...
Searching...
No Matches
Variables

Declarations of variables and objects. More...

Namespaces

namespace  LedMode
 Led mode constants.
 

Classes

struct  ImuData
 IMU raw data. More...
 
struct  Speed
 Speed raw data. More...
 
struct  GPSData
 GPS raw data. More...
 
struct  RiderTorque
 Torsiometer raw data. More...
 
struct  Steer
 Steering raw data. More...
 
struct  ForkDisp
 Fork displacement raw data. More...
 
struct  ActCurr
 Actual motor current raw data. More...
 
struct  Voltage
 Battery voltage raw data. More...
 
struct  Counter
 Counters for lower sampling rate. More...
 
struct  Timing
 Time taken by functions. More...
 
struct  RemoteCtrl
 Signals from remote controller. More...
 
struct  IOstatus
 Save the IO startu status. More...
 

Functions

TS4::Stepper brakeMotor (BR_STEP_PIN, BR_DIR_PIN)
 Stepper object for the brake motor.
 

Variables

uint32_t sampling_timer = 0
 Timer for the main cycle.
 
uint8_t GPSserial_extra_buffer [GPS_EXTBUFSIZE]
 
uint32_t nanVal = NAN_VAL
 NaN variable.
 
int8_t LEDmode = LedMode::DEF
 LED mode variable.
 
boolean LEDstate = false
 LED state.
 
Timing timing
 Timing of functions.
 
Counter counters
 Counters for lower sampling rate.
 
ImuData imuData_raw
 Raw data from IMU and magnetometer.
 
Speed speed_raw
 Raw data from speed sensor.
 
GPSData gpsData_raw
 Raw data from the GPS.
 
RiderTorque riderTorque_raw
 Raw data from the torsiometer.
 
ActCurr actCurr_raw
 Raw data from the motor current sensor.
 
Steer steer_raw
 Raw data from the steering sensors.
 
ForkDisp forkDisp_raw
 Raw data from the fork-displacement sensor.
 
Voltage voltage_raw
 Raw data from the battery voltage sensor.
 
RemoteCtrl remote_raw
 Channels from the remote controller.
 
IOstatus iostatus
 IO status flags.
 
ISM330DHCXSensor imu & USED_SPI
 IMU object (accelerometer and gryometer).
 
ADC * adc = new ADC()
 Pointer to ADC object.
 
Adafruit_GPS gps & UART_GPS
 GPS object.
 
ControlClass ctrl
 Control object.
 
SerialTransfer speedSensor
 SerialTransfer object for speed sensor.
 
SbusRx sbus & UART_SBUS
 SBUS object for remote controller.
 
int8_t enable_old = 0
 
int8_t enable_new = 0
 
uint32_t test_timer = 0
 
uint32_t test_start = 0
 

Detailed Description

Declarations of variables and objects.

Definitions of data types and declarations of the global variables and objects, including namespaces and structs.

See also
objects.h

Function Documentation

◆ brakeMotor()

TS4::Stepper brakeMotor ( BR_STEP_PIN ,
BR_DIR_PIN  )

Stepper object for the brake motor.

Variable Documentation

◆ actCurr_raw

ActCurr actCurr_raw

Raw data from the motor current sensor.

◆ adc

ADC* adc = new ADC()

Pointer to ADC object.

◆ counters

Counter counters

Counters for lower sampling rate.

◆ ctrl

ControlClass ctrl

Control object.

◆ enable_new

int8_t enable_new = 0

◆ enable_old

int8_t enable_old = 0

◆ forkDisp_raw

ForkDisp forkDisp_raw

Raw data from the fork-displacement sensor.

◆ gpsData_raw

GPSData gpsData_raw

Raw data from the GPS.

◆ GPSserial_extra_buffer

uint8_t GPSserial_extra_buffer[GPS_EXTBUFSIZE]

◆ imuData_raw

ImuData imuData_raw

Raw data from IMU and magnetometer.

◆ iostatus

IOstatus iostatus

IO status flags.

◆ LEDmode

int8_t LEDmode = LedMode::DEF

LED mode variable.

Default value is LedMode::DEF.

See also
LedMode

◆ LEDstate

boolean LEDstate = false

LED state.

See also
do_led()

◆ nanVal

uint32_t nanVal = NAN_VAL

NaN variable.

See also
Data logging Debugging NAN_VAL

◆ remote_raw

RemoteCtrl remote_raw

Channels from the remote controller.

◆ riderTorque_raw

RiderTorque riderTorque_raw

Raw data from the torsiometer.

◆ sampling_timer

uint32_t sampling_timer = 0

Timer for the main cycle.

The timer is used to run the main cycle at a sampling time of SAMPLING_TIME.

See also
SAMPLING_TIME

◆ speed_raw

Speed speed_raw

Raw data from speed sensor.

◆ speedSensor

SerialTransfer speedSensor

SerialTransfer object for speed sensor.

◆ steer_raw

Steer steer_raw

Raw data from the steering sensors.

◆ test_start

uint32_t test_start = 0

◆ test_timer

uint32_t test_timer = 0

◆ timing

Timing timing

Timing of functions.

◆ UART_GPS

Adafruit_GPS gps& UART_GPS

GPS object.

◆ UART_SBUS

SbusRx sbus& UART_SBUS

SBUS object for remote controller.

◆ USED_SPI

MCP492X dac & USED_SPI

IMU object (accelerometer and gryometer).

DAC object.

Magnetometer object.

◆ voltage_raw

Voltage voltage_raw

Raw data from the battery voltage sensor.