-
-
Save suru-dissanaike/748a95fa1a7b2e426f857efa57bf0174 to your computer and use it in GitHub Desktop.
Mongoose JavaScript example ADC driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let MYADC = { | |
cfg: ffi('int adc1_config_channel_atten(int, int)'), // that function must be in the SDK | |
}; | |
let db6 = 2; // whatever the numeric value for 6 dB is 2 | |
MYADC.cfg(pin, db6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment