Program Uploads but Doesn't Run

I’ve been trying for some time to upload to my particle offline via USB. However, I am not having much luck.
I have tried two approaches, and I would really appreciate it if you could help me figure out what I’m doing wrong.
In both approaches, I try to upload the same sketch, led.ino which should just set D7 (the blue led pin) to HIGH. However, the LED doesn’t light up. (I’ve also tried setting the LED to LOW just to check if that would work.)

Here’s the program:

void setup() {
	pinMode(D7, OUTPUT);
}
void loop() {
	digitalWrite(D7, HIGH);
	delay(1);
}

Just to make sure I’m not making a simple syntactical error, I’ve also tried the following programs from other authors:

#define PIN D7
int state = 0;

void setup() {
    //tell the device we want to write to this pin
    pinMode(PIN, OUTPUT);
}
void loop() {
    //alternate the PIN between high and low
    digitalWrite(PIN, (state) ? HIGH : LOW);

    //invert the state
    state = !state;

    //wait half a second
    delay(500);
}

and

int ledPin = D7;

void setup()
{
  pinMode(ledPin, OUTPUT);
}

void loop()
{
  digitalWrite(ledPin, HIGH);
  delay(250);
  digitalWrite(ledPin, LOW);
  delay(250);
}

Okay, here we gothe first and most “straightforward” method:

With led.ino in the same directory I run:

particle compile photon led.ino --saveTo firmware.bin

I then get the following encouraging output (along with a new firmware.bin file):

Compiling code for photon

Including:
    led.ino
attempting to compile firmware
downloading binary from: /v1/binaries/594c045c9033913766700b9c
saving to: firmware.bin
Memory use:
   text    data     bss     dec     hex filename
   5132       8    1448    6588    19bc /workspace/target/workspace.elf

Compile succeeded.
Saved firmware to: C:\Users\dexter\Documents\photon\test3\firmware.bin

Then, I run particle flash --usb firmware.bin which gives me the following output:

Found DFU device 2b04:d006
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D firmware.bin
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 5140
Download        [=========================] 100%         5140 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!

Flash success!

To me, there seem to be no warning signs (except for possibly the Invalid DFU suffix signature warning). However, the LED on my photon does not light up. (Side note: I know that the LED isn’t broken, as it turns on when I enter DFU mode)

For the second approach, I followed Sparkfun’s Tutorial to the letter. That didn’t work either.

Then I tried rebuilding everything via the Local build using gcc-arm Tutorial. This didn’t work either.

Also, my firmware is up to date. I updated it with the following commands:

dfu-util -d 0x2B04:0xD006 -a 0 -s 0x8020000 -D system-part1-0.6.2-photon.bin
dfu-util -d 0x2B04:0xD006 -a 0 -s 0x8060000:leave -D system-part2-0.6.2-photon.bin

Any help would be wonderful :slight_smile: I feel like I’ve run out of options/leads to chase as I don’t have a single error and I’ve recompiled everything multiple times from source. If there’s anything I can clarify, please let me know

EDIT: I am running windows 10

No hard promises, but give Particle update and then Particle flash --usb tinker a shot, both in DFU mode. See if Tinker works (if it’s not on there already). If it does, try downloading the “blink an LED” example from the web IDE using the little cloud icon next to the name of the app, and try flashing that over USB?

Thank Moors7 for the help, sadly running particle update and then particle flash --usb tinker didn’t change anything (tinker was already on the device). I also followed your advice and tried the “blink and LED” example from the web IDE. Again, no success.

@mp40, try using a different pin with external LED and current limiting resistor (330 to 1K ohms) to see if that works. Is the photon inserted into a protoboard?

Yes, the photon is inserted into a breadboard. Sadly, using an external LED did not work either. There is no voltage across the LED and (naturally) it does not light. Thanks for the suggestion though :slight_smile: (Sorry for the late reply, I didn’t have an LED on me at the moment.)