8 #ifndef COMPONENTS_ESPECTRO32_SRC_ESPECTRO32_BOARD_H_
9 #define COMPONENTS_ESPECTRO32_SRC_ESPECTRO32_BOARD_H_
15 #include "ESPectro32_Constants.h"
16 #include "ESPectro32_LED.h"
17 #include "ESPectro32_RGBLED.h"
18 #include "ESPectro32_Button.h"
19 #include "ESPectro32_LedMatrix.h"
22 #include <driver/adc.h>
24 #define ESPECTRO32_DEBUG_PRINT(...) ESP_LOGD("ESPECTRO32", __VA_ARGS__);
25 #define ESPECTRO32_INFO_PRINT(...) ESP_LOGI("ESPECTRO32", __VA_ARGS__);
26 #define ESPECTRO32_ERROR_PRINT(...) ESP_LOGE("ESPECTRO32", __VA_ARGS__);
61 void blinkLED(uint32_t interval = 500, uint32_t count = UINT16_MAX);
62 void fadeLED(uint32_t duration = 1000, uint32_t count = UINT16_MAX);
107 int readAnalog(adc1_channel_t channel, adc_bits_width_t bitWidth = ADC_WIDTH_12Bit, adc_atten_t atten = ADC_ATTEN_6db);
118 float readAnalogVoltage(adc1_channel_t channel, adc_bits_width_t bitWidth = ADC_WIDTH_12Bit, adc_atten_t atten = ADC_ATTEN_6db);
119 int readPhotoTransistorValue(adc_bits_width_t bitWidth = ADC_WIDTH_12Bit, adc_atten_t atten = ADC_ATTEN_6db);
120 float readPhotoTransistorVoltage(adc_bits_width_t bitWidth = ADC_WIDTH_12Bit, adc_atten_t atten = ADC_ATTEN_6db);
122 int readOnBoardHallSensor();
bool begin()
Must be called as soon as possible to do initialization stuffs.
Definition: ESPectro32_Board.cpp:44
int readAnalog(adc1_channel_t channel, adc_bits_width_t bitWidth=ADC_WIDTH_12Bit, adc_atten_t atten=ADC_ATTEN_6db)
Conveniently read analog data.
Definition: ESPectro32_Board.cpp:166
Represent LED.
Definition: ESPectro32_LED.h:95
void stopLEDAnimation()
stop the current LED animation
Definition: ESPectro32_Board.cpp:96
ESPectro32_RGBLED & RgbLed()
Get RGB LED object of the ESPectro32 board.
Definition: ESPectro32_Board.cpp:53
void fadeLED(uint32_t duration=1000, uint32_t count=UINT16_MAX)
fade the built-in LED
Definition: ESPectro32_Board.cpp:89
RGB LED class.
Definition: ESPectro32_RGBLED.h:20
float readAnalogVoltage(adc1_channel_t channel, adc_bits_width_t bitWidth=ADC_WIDTH_12Bit, adc_atten_t atten=ADC_ATTEN_6db)
Conveniently read analog data converted to its voltage value.
Definition: ESPectro32_Board.cpp:175
Definition: ESPectro32_Board.h:38
ESPectro32_LedMatrix & LedMatrix()
Get Led Matrix object.
Definition: ESPectro32_Board.cpp:149
ESPectro32_Button & ButtonB()
Get Button "B" object.
Definition: ESPectro32_Board.cpp:140
The class represents Led Matrix.
Definition: ESPectro32_LedMatrix.h:76
void toggleLED()
Toggle the current state of the LED.
Definition: ESPectro32_Board.cpp:117
void scanI2C()
Scan attached I2C peripherals.
Definition: ESPectro32_Board.cpp:225
void turnOnLED()
Turn on built-in LED.
Definition: ESPectro32_Board.cpp:64
void turnOffLED()
Turn off built-in LED.
Definition: ESPectro32_Board.cpp:71
ESPectro32_LED & LED()
Get LED object.
Definition: ESPectro32_Board.cpp:105
void blinkLED(uint32_t interval=500, uint32_t count=UINT16_MAX)
blink the built-in LED
Definition: ESPectro32_Board.cpp:80
ESPectro32_Button & ButtonA()
Get Button "A" object.
Definition: ESPectro32_Board.cpp:126