Photon 2 D7 led

Dumb question: is that led supposed to blink all the time? Starts when I plug in USB.
edit: I meant it is on steady, not blinking.

Yes, it will be on dimly, unless you add:

pinMode(D7, OUTPUT);
digitalWrite(D7, LOW);

The setup() method is a good place to put it. Also add:

SYSTEM_THREAD(ENABLED);

near the top, not in a function. It's good practice anyway, and it will also prevent the light from being on until the cloud connection is enabled.

Thank you for your reply. It is very bright and the digitalWrite(D7, LOW); does nothing. I have asked support to allow me to return for refund, I think it is defective. I also think it is now a black hole where I am throwing too much time.
Again, thank you very much for your help.

Being hard headed, as well as slow, I finally figured it out. In case anyone is interested, here it is:
I started out by trying to run the simple flash D7 led with the demo. It compiled fine, would not flash. Would only try to flash if I put the device in dfu mode manually. Permission problem, fix by chmod to /dev/ACM1. Now flash but never changed the state of D7. P2 showed D7 on steady and status blinking blue. If I were starting over:

  1. Install IDE, etc.

  2. Install command line stuff, add path statement to .bashrc

  3. chmod /dev/ACM1. Put device in dfu mode and get serial number to register. Registered same.

  4. Install app on iPhone, waste of time, never showed up in WiFi.

  5. Delete app from iPhone.

  6. Run "particle serial wifi" to configure wireless. Wireless connected to home. *

  7. Re-compile/flash demo D7 program. Now it would put the device in dfu automagically and flash. D7 on/off. Status led annoyingly "breathes".

  8. Connected a Temp module I had leftover from a project we did measuring temps in a dozen AC condensers (Pi).

  9. P2 successfully published the temp once a minute.

  10. Created and flashed a reset program to turn off the annoying led's and disconnect from router.

NOTE: this device would do nothing until I did #6!

Offhand, I would say that from a newbie's point of view, your documentation sucks. Where is the P2 users guide? If it exists, I couldn't find it. Thankfully, you have some very generous people in the forums.

Now looking for a library to do MQTT.

hey, just for fun:

Now on a serious note:

This lib works great.
Best

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.