Hello, I started with my new electron today and run into a beginner problem. I am trying to get the hello world(“blink led”) programm to work.
If I flash it OTA it works fine without problems(The led on D0 blinks and the onboard led on D7 blinks). But if I try to flash it direct via cmd and the usb the led on D0 does not blink(The onboard Led on D7 does).
Here is what I do:
I copy the code from the web-developer to the desktop particle dev
Then I run in cmd
particle compile electron blinkled.ino
particle flash --serial electron_firmware_123542342123
I get no errors and it tells me I sent the new firmware with success. The D7 led blinks BUT the D0 led does not.
If I flash the same programm OTA again the D7 led and the D0 led start to blink.
Would be really nice if somebody can help a beginner here
In the example blink-an-led1.ino I should connect a led to D0. This is what I did. If I flash now blink-an-led1.ino OTA the led I connected to D0 blinks. But if I flash the same programm with the 2 commands I posted aboth the led connected to D0 does not blink.
int led1 = D0; // Instead of writing D0 over and over again, we'll write led1
// You'll need to wire an LED to this one to see it blink.
int led2 = D7; // Instead of writing D7 over and over again, we'll write led2
// This one is the little blue LED on your board. On the Photon it is next to D7, and on the Core it is next to the USB jack.
So my guess is that I have a problem when I compile and flash via usb. But I don´t get any errors
Hi @Gecko, Did you manage to get this working? I seem to be having the sample problem, though I haven’t yet tried flashing OTA. All my outputs seem to be the same, and likewise it appears to have 0.5.0 installed already.
Yes I managed to get it working! I think I got some kind of hardware problem. I replaced the whole setup (breadboard, resistor,led) with hardware from my own and it worked. Saddly I am a totaly beginner when it comes to electronics so I can´t give you more information here.
Thanks for that, I just did a bit more experimenting only to find out that the SIM card is actually required for code to run. I was hoping to do all my development without a SIM and just add it when required, but apparently it won’t boot properly without it. The behavior I see is that once the code is loaded, it appears to briefly start and then reset the Electron.
Anyway, all appears fine, provided the SIM is configured.
You can develop without SIM card, but you need to set another SYSTEM_MODE() than AUTOMATIC or you can also use SYSTEM_THREAD(ENABLED) (or a combination thereof)