mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 08:36:12 +00:00
ESP-NOW Transmitter
This commit is contained in:
0
ESP32-IDF_ESPNOW-Transmitter/build/.ninja_lock
Normal file
0
ESP32-IDF_ESPNOW-Transmitter/build/.ninja_lock
Normal file
@@ -1 +1 @@
|
||||
ref: refs/heads/main
|
||||
4c2820d377d1375e787bcef612f0c32c1427d183
|
||||
|
@@ -18,7 +18,7 @@ set(HEAD_HASH)
|
||||
file(READ "/home/abobkov/MyProjects/ESP-Nodes/ESP32-IDF_ESPNOW-Transmitter/build/CMakeFiles/git-data/HEAD" HEAD_CONTENTS LIMIT 1024)
|
||||
|
||||
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
|
||||
set(GIT_DIR "/home/abobkov/MyProjects/ESP-Nodes/.git")
|
||||
set(GIT_DIR "/home/abobkov/esp/v5.4.1/esp-idf/.git")
|
||||
# handle git-worktree
|
||||
if(EXISTS "${GIT_DIR}/commondir")
|
||||
file(READ "${GIT_DIR}/commondir" GIT_DIR_NEW LIMIT 1024)
|
||||
|
@@ -1 +1 @@
|
||||
abcfede450517ab557191e4e8820b3cd4ba7e368
|
||||
4c2820d377d1375e787bcef612f0c32c1427d183
|
||||
|
@@ -44,26 +44,7 @@ adc_oneshot_unit_handle_t adc_xy_handle;
|
||||
sensors_data_t buffer;
|
||||
|
||||
//static sensors_data_t buffer;
|
||||
esp_err_t joystick_adc_init(void) {
|
||||
adc_oneshot_unit_init_cfg_t adc_init_config_xy = {
|
||||
.unit_id = ADC_UNIT_1,
|
||||
.ulp_mode = ADC_ULP_MODE_DISABLE,
|
||||
};
|
||||
ESP_ERROR_CHECK(adc_oneshot_new_unit(&adc_init_config_xy, &adc_xy_handle));
|
||||
|
||||
adc_oneshot_chan_cfg_t config_x = {
|
||||
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
|
||||
.atten = ADC_ATTEN_DB_12,
|
||||
};
|
||||
adc_oneshot_chan_cfg_t config_y = {
|
||||
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
|
||||
.atten = ADC_ATTEN_DB_12,
|
||||
};
|
||||
ESP_ERROR_CHECK(adc_oneshot_config_channel(adc_xy_handle, ADC_CHANNEL_0, &config_x));
|
||||
ESP_ERROR_CHECK(adc_oneshot_config_channel(adc_xy_handle, ADC_CHANNEL_1, &config_y));
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
void joystick_show_raw_xy() {
|
||||
ESP_ERROR_CHECK(adc_oneshot_read(adc_xy_handle, ADC_CHANNEL_0, &x));
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "esp_adc/adc_oneshot.h"
|
||||
#include "esp/err.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
esp_err_t joystick_adc_init(void) {
|
||||
adc_oneshot_unit_init_cfg_t adc_init_config_xy = {
|
||||
|
Reference in New Issue
Block a user