Comments (10)
@hathach will try to replicate when there's some time :) a lot i2c changed recently
from adafruit_seesaw.
if the i2c is disconnected, it will cause undefined behavior so while this is worth looking at...plz do not disconnect cables :)
from adafruit_seesaw.
Haha good to know! I just assumed that because of the following code in the basic example I should expect trellis.begin()
to return and not hang even if the cable is disconnected, and then print the appropriate message.
if (!trellis.begin()) {
Serial.println("Could not start trellis, check wiring?");
while(1);
} else {
Serial.println("NeoPixel Trellis started");
}
But interesting to know that if i2c is disconnected it could cause undefined behavior, thanks for explaining that!
from adafruit_seesaw.
I will try to reproduce it and post update
from adafruit_seesaw.
@adrienp could you confirm the issue still exists with Arduino IDE and also post your Arduino compile log as attached txt here for analysis. Since I only test and familiar with Arduino, I would like to make sure we are testing with the same setup as well as same version of BSP and used libraries.
from adafruit_seesaw.
@hathach Yes this issue also exists with Arduino IDE. When the trellis is properly connected, the "basic" example compiles and uploads and I get the expected message NeoPixel Trellis started
in the Serial Monitor. When the trellis is not connected, it compiles and uploads, but nothing is printed to the serial monitor because it seems to hang on trellis.begin()
.
Apologies for the long copy-pastes below, but here's my compile log:
from adafruit_seesaw.
thank for the confirmation and log, please post it as attached txt, should you have to do it again for readibility.
from adafruit_seesaw.
@adrienp sorry for late response, I got my time to try this out. Device is not actually hanged, the Serial.print()
does not appear because of while(1) ;
blocking 100% CPU. TinyUSB stack run in the background and requires a delay()/yield() in order to send/receive data from/to USB bus. This is quite typical pitfall when using with TinyUSB. I will update the example to also add delay(1).
Note: You could also force serial immediately by using Serial.flush()
.
void setup() {
Serial.begin(9600);
while(!Serial) delay(1);
if (!trellis.begin()) {
Serial.println("Could not start trellis, check wiring?");
while(1) delay(1);
} else {
Serial.println("NeoPixel Trellis started");
}
PS: will be fixed by #62
from adafruit_seesaw.
Oh wow! Thanks for digging into this and responding @hathach !
from adafruit_seesaw.
no problem at all, I am glad it makes sense to you.
from adafruit_seesaw.
Related Issues (20)
- ESP32 and I2C encoder HOT 8
- seewaw not find it on default address.. HOT 7
- Adafruit Joy Featherwing not responding to interrupts when using Seesaw library HOT 6
- Example for using multiple seesaw ATtiny817 BoBs? HOT 1
- NeoTrellis callback registration does not compile HOT 3
- The NeoTrellis INT line occasionally getting stuck low issue.
- Adafruit I2C Stemma QT Rotary Encoder - no encoder or neopixel output HOT 1
- Missing documentation on Neopixel setBrightness function
- ATtiny817 Arduino Input Pullups HOT 2
- Allow Alternative Wires for miniTFTWing HOT 2
- RP2040 Feather cannot interface to Mini TFT Wing unless Seesaw library code is manually changed. HOT 3
- Attiny1616 "seesaw not found" with Arduino Nano 33 BLE HOT 10
- Add example demonstrating encoder.getEncoderDelta() HOT 1
- setEncoderPosition() not working HOT 12
- Neotrellis basic 2 button press
- Cannot change I2C address of the Adafruit Mini I2C STEMMA QT Gamepad HOT 2
- Calling digitalReadBulk before analogRead causes analogRead to return 1024
- Quad Rotary Encoder not discovered with Arduino GIGA I2C scan
- see_saw library doesn't compile for Arduino Nano ESP32 HOT 2
- servo frequency NOT set properly for ATtiny1616 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_seesaw.