First... CircuitPython. I just cannot get it running on the board at all. I follow the instructions located at https://learn.adafruit.com/adafruit-esp ... cuitpython
The first issue I run into is that the web-flasher warns it's no longer supported... but it SEEMS to work so I went forward. I erase the board and then flash the .bin file on it for CP. The console tells me to press the reset button which I do... but it seems to have no effect. So I unplug the board and replug it in. At this point the board's built in neopixel periodically flashes green so I think everything went right.
I tried using MU to connect to the board via serial... MU cannot find anything to connect to.
I'm not sure what/where I am going wrong on that?
So moving on I did all the reset steps and got back to a factory default thinking I would go down the Arduino route as I couldn't get CP working.
First off, having to clone and build the "Espressif ESP32 board support" was a time consuming pain but pretty straight forward and worked perfectly.
I was able to push the blink and wifi test sketches to the board and verify they work properly... So next I tried to take control of the neopixel and do a simple sketch before moving on to more complicated things. Thats where it went wrong, trying to control the neopixel is causing an abort on the processor and a reboot. Error and code below.
Code: Select all
abort() was called at PC 0x4008603f on core 1
Backtrace: 0x40083b79:0x3ffb2640 0x400898a1:0x3ffb2660 0x4008e7e1:0x3ffb2680 0x4008603f:0x3ffb2700 0x40086189:0x3ffb2730 0x400d44f8:0x3ffb2750 0x400d158c:0x3ffb2790 0x400d179d:0x3ffb27e0 0x400d14c5:0x3ffb2800 0x400d2305:0x3ffb2820
ELF file SHA256: b7b975a4d892dc46
Rebooting...
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
Code: Select all
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel pixels(8, 0, NEO_GRB + NEO_KHZ800);
// Color Constants used by display
#define RED 0xFF0000
#define GREEN 0x00FF00
#define BLUE 0x0000FF
#define YELLOW 0xFFFF00
#define MAGENTA 0xFF00FF
#define LIGHTBLUE 0x1f75fe
#define FULL_BRIGHTNESS 50
#define DIM_BRIGHTNESS 15
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
initialize_display();
}
void loop() {
Serial.println("RAWR");
//displayColor(GREEN);
pixels.setPixelColor(0, GREEN);
pixels.setBrightness(20);
pixels.show();
delay(500);
//clearColorLed();
//pixels.clear(); // Set all pixel colors to 'off'
//pixels.show(); // Send the updated pixel colors to the hardware.
delay(500);
}
void initialize_display(){
pixels.begin();
}
/**
* Display a color on the external LED.
* This clears existing colors and immeadiatly
* displays the new color.
*/
void displayColor(uint32_t c){
displayColor(c, FULL_BRIGHTNESS);
}
void displayColor(uint32_t c, int brightness){
clearColorLed();
pixels.setPixelColor(0, c);
pixels.setBrightness(brightness);
pixels.show(); // Send the updated pixel colors to the hardware.
}
void clearColorLed(void){
pixels.clear(); // Set all pixel colors to 'off'
pixels.show(); // Send the updated pixel colors to the hardware.
}
/**
* Flashes the led.
* color: Color to display on the LED
* times: Number of times the LED is to blink
* interval: length the light is on and length its off (1 blink)
*/
void blink(uint32_t color, int times, int interval){
int i = 0;
while(i < times){
displayColor(color);
delay(interval);
clearColorLed();
delay(interval);
i++;
}
}
Can anyone point me at what dopey thing I am doing wrong?