File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change
1
+ : ESP32C3: Get analogRead working correctly
2
+
1
3
2v24 : Bangle.js2: Add 'Bangle.touchRd()', 'Bangle.touchWr()'
2
4
Bangle.js2: After Bangle.showTestScreen, put Bangle.js into a hard off state (not soft off)
3
5
Fix for unexpected power draw on newest batch of Bangle.js devices
Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ int readADC(Pin pin){
145
145
#if ESP_IDF_VERSION_MAJOR >=4
146
146
// ESP_IDF 4.x - int adc1_get_voltage(adc1_channel_t channel) //Deprecated. Use adc1_get_raw() instead
147
147
int value = adc1_get_raw (channel );
148
+ #if CONFIG_IDF_TARGET_ESP32C3
149
+ // we need to call it twice to get a decent value on the C3 for some reason!
150
+ // https://forum.espruino.com/conversations/395499/?offset=100#17482163
151
+ value = adc1_get_raw (channel );
152
+ #endif
148
153
#else
149
154
value = adc1_get_voltage (channel );
150
155
#endif
You can’t perform that action at this time.
0 commit comments