Init I2C #85
Unanswered
glebourg76
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi i try some code on a WiFi LoRa 32(V3). i installed heltec_unofficial.h and try your starting code
// Turns the 'PRG' button into the power button, long press is off
#define HELTEC_POWER_BUTTON // must be before "#include <heltec_unofficial.h>"
// Uncomment this if you have Wireless Stick v3
// #define HELTEC_WIRELESS_STICK
// creates 'radio', 'display' and 'button' instances
#include <heltec_unofficial.h>
void setup() {
heltec_setup();
Serial.println("Serial works");
// Display
display.println("Display works");
// Radio
display.print("Radio ");
int state = radio.begin();
if (state == RADIOLIB_ERR_NONE) {
display.println("works");
} else {
display.printf("fail, code: %i\n", state);
}
// Battery
float vbat = heltec_vbat();
display.printf("Vbat: %.2fV (%d%%)\n", vbat, heltec_battery_percent(vbat));
}
void loop() {
heltec_loop();
// Button
if (button.isSingleClick()) {
display.println("Button works");
// LED
for (int n = 0; n <= 100; n++) { heltec_led(n); delay(5); }
for (int n = 100; n >= 0; n--) { heltec_led(n); delay(5); }
display.println("LED works");
}
}
I get
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x118c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xc20
load:0x403cb700,len:0x30e0
entry 0x403c88b8
E (40) i2c.master: I2C transaction unexpected nack detected
E (48) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (48) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed
Serial works
don't understand what i miss !!
thx
Beta Was this translation helpful? Give feedback.
All reactions