I am programming a NodeMCU using the Arduino IDE. I am testing some code for someone and I'm having a few problems.
The first problem: I can compile the code and upload it. That works well. But if I remove power or press reset, the code disappears. I know I'm one of the only people who struggles with the "simple to use" ESP8266s, but I've never had much luck with them. Obviously, I am missing a step but I can't see what it is.
Second problem: I am reading an Adafruit INA219A current sensors. I need to get the maximum resolution from the bus voltage. Looking through the Adafruit INA219.h file, I see the following lines:
#define INA219_CONFIG_BADCRES_MASK (0x0780) // Bus ADC Resolution Mask
#define INA219_CONFIG_BADCRES_9BIT (0x0080) // 9-bit bus res = 0..511
#define INA219_CONFIG_BADCRES_10BIT (0x0100) // 10-bit bus res = 0..1023
#define INA219_CONFIG_BADCRES_11BIT (0x0200) // 11-bit bus res = 0..2047
#define INA219_CONFIG_BADCRES_12BIT (0x0400) // 12-bit bus res = 0..4097
I want the 12 bit resolution, but I don't see what to do with this in the INA219 library file.
Please excuse my somewhat ignorant questions. I just need to do some simple testing.
The first problem: I can compile the code and upload it. That works well. But if I remove power or press reset, the code disappears. I know I'm one of the only people who struggles with the "simple to use" ESP8266s, but I've never had much luck with them. Obviously, I am missing a step but I can't see what it is.
Second problem: I am reading an Adafruit INA219A current sensors. I need to get the maximum resolution from the bus voltage. Looking through the Adafruit INA219.h file, I see the following lines:
#define INA219_CONFIG_BADCRES_MASK (0x0780) // Bus ADC Resolution Mask
#define INA219_CONFIG_BADCRES_9BIT (0x0080) // 9-bit bus res = 0..511
#define INA219_CONFIG_BADCRES_10BIT (0x0100) // 10-bit bus res = 0..1023
#define INA219_CONFIG_BADCRES_11BIT (0x0200) // 11-bit bus res = 0..2047
#define INA219_CONFIG_BADCRES_12BIT (0x0400) // 12-bit bus res = 0..4097
I want the 12 bit resolution, but I don't see what to do with this in the INA219 library file.
Please excuse my somewhat ignorant questions. I just need to do some simple testing.