Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_IS31FL3731.h>
Adafruit_IS31FL3731_Wing ledmatrix = Adafruit_IS31FL3731_Wing();
void setup() {
Serial.begin(9600);
if (!ledmatrix.begin()) {
Serial.println("IS31 not found");
while (1);
}
}
// there are 33 steps. (0, 15), 16, (17, 32), 33
int step = 0;
void draw(int to) {
for (uint8_t y=0; y<9; y++) {
for (uint8_t x=0; x<16; x++) {
if (x < to) {
ledmatrix.drawPixel(x, y, 10);
} else {
ledmatrix.drawPixel(x, y, 0);
}
}
}
}
void loop() {
if (step < 16) {
draw(step);
} else if (step > 16) {
draw(32 - step);
}
// 1,000ms=1 second -> 4,000ms = 4 seconds / 16 segments = 250
if (step == 16) {
step++;
delay(4000);
} else if (step == 33) {
step = 0;
delay(4000);
} else {
step++;
delay(250);
}
}
  • Installed Arduino on my mac: brew cask install arduino
  • Started running through the tutorial. Truth be told, I skipped through a few sections because I just wanted to confirm that it all worked with an Arduino. It didn't: the promised serial port doesn't appear. Internet forum suggest that bad USB cables might be at fault: I switch, still nothing. I plug in the battery - it can run on USB power alone, but still it's a worthwhile variation to test. That's not it.
  • How about... not Arduino? My code is going to be super simple anyway, maybe I should go with this NodeMCU approach that I've never tried before. Good opportunity to learn. That flow includes a driver, which - well, I'm realizing that's probably required for both approaches. And hey, that's it. Or, it seemed like it was it, but it isn't. It added a port that I was able to connect to, but didn't work for uploading, and now that port has disappeared.
  • This is the predictable slump when all hardware is terrible, and you think: maybe software is convoluted, but I'm using a USB-C to USB-A converter, a USB-A to USB-Mini cable, and a serial emulator, all just in the realm of 'the wire'.
  • I've tried three USB cables so far. Maybe they're all bad: USB-Mini is kind of cursed as being mostly for charging, and this device is that. I don't blame them for the decision - hey, it could be USB-C but that isn't catching on. To dig through my pile of cables. Okay, so I now have 5 USB-Mini cables to try.
  • And none of them fix the issue. Time to eliminate them as a problem by using a USB-Mini cable to do something other than connecting to this board. I'll try connecting to my running watch instead. About an hour in at this point. And this cable works, so the cable isn't the issue. And I should have run more this week. I'll run tomorrow, and try to feel less bad about not running. At least my running watch has fresh assisted-GPS locations now.
  • Now aware of the potential compounding problem: what if I was using a bad cable before, installed the drivers, switched to a good cable, and now the drivers will prevent that cable from working properly?
  • Googling this at least turns up that one of the smartest people also thinks this is kind of torturous.
  • I read this article that encourages me to restart and I do.
  • That doesn't work. All of the guides recommend choosing the port and choosing the type, but what about the programmer? I try a few, based on what I see people using in screenshots, but that makes no difference.
  • I'm making some pasta right now too. It's important to balance failure with success, I'll almost certainly succeed with the pasta.
  • So now I'm realizing that despite this being a Feather board, it's a Feather HUZZAH ESP8266 board, so it has different documentation. So I missed this page that says, for new macOS versions, you need to install the legacy driver (of course).
  • With the new, correct software installed, everything worked and I had learned a lesson in humility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment