# \[Electron v0.5.3\]Software Timers don't seem to work...at all \[Solved\]

**URL:** <https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540>\
**Category:** Troubleshooting\
**Created:** [October 15, 2016, 12:37am UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540 "2016-10-15T00:37:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![markjones.cpe](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@markjones.cpe](https://community.particle.io/u/markjones.cpe)\
**Post date:** [October 15, 2016, 12:37am UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/1 "2016-10-15T00:37:10Z")

</div>

I’m playing with the FreeRTOS software timers and I can’t seem to get an LED to turn on after 10 seconds. Am I missing an #include? How did this verify/compile?

1. Why is the Timer type not shaded blue like it is in the examples given in firmware doc?  
[https://docs.particle.io/reference/firmware/electron/#software-timers](https://docs.particle.io/reference/firmware/electron/#software-timers)
2. Yes, I’ve tested the LED, it works on the same pin with different code.
3. I’ve tried placing the Timer declaration above the callback definition as well - no luck.

![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/e/ed88556243eb3947eb936cfd364ca88c5d968702.png)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 15, 2016, 7:04am UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/2 "2016-10-15T07:04:23Z")

</div>

I could try, but I’m pretty sure they work (definetly did in 0.5.2 and do in 0.6.0-rc.2).

Maybe it’s your wiring or LED.  
How about this for a test

```cpp
const int led1 = D7;
void lightup() {
  digitalWrite(led1, !digitalRead(led1)); // toggle state
}
Timer timtim(1000, lightup);

void setup() {
  pinMode(led1, OUTPUT);
  timtim.start();
}

```

@1: Other types are not hilighted blue in Build either, so that’s no indication for a problem.  
The docs hilighting is a different one to Build or Dev - but I agree that the keyword list for Build could do with some updates - on the other hand a replacement is in the works, so I guess this won’t happen and we’ll have to wait for IDE 2.0.

BTW, if you post your code as text instead of an image, it’d save us the hassle of retyping it 😉

* * *

_Update:_  
Tested with my Photon @ 0.5.3 and it works as expected

---

<div class="post-metadata">

**Author:** ![markjones.cpe](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@markjones.cpe](https://community.particle.io/u/markjones.cpe)\
**Post date:** [October 15, 2016, 3:17pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/3 "2016-10-15T15:17:41Z")

</div>

I think I found the problem. My code isn’t actually loading successfully over serial since I updated to v0.5.3. I can load Tinker OTA but if I load something else first and then tinker over serial it simply is not recognized as Tinker in the app - even though I’m receiving a “Flash Success!” message.

The same is true of the test apps we posted on this thread. They work when loaded OTA but not serial.

What…in tarnation?!

![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/4/4fb38c8b22e4495d961cdd539f6b2a929ba78e5a.png)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 15, 2016, 3:20pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/4 "2016-10-15T15:20:36Z")

</div>

That is most likely because it’s an incompatible binary.  
If you try flashing via

```nohighlight
particle flash --usb firmware.bin

```

You’ll get better feedback about the possible reason.

You can also try

```nohighlight
particle binary inspect firmware.bin

```

With that you should get something like this

```nohighlight
C:\Temp\dmy>particle binary inspect firmware_053.bin
firmware_053.bin
 CRC is ok (bbe9b3bd)
 Compiled for electron
 This is an application module number 1 at version 4
 It depends on a system module number 2 at version 21

```

---

<div class="post-metadata">

**Author:** ![markjones.cpe](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@markjones.cpe](https://community.particle.io/u/markjones.cpe)\
**Post date:** [October 15, 2016, 4:14pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/6 "2016-10-15T16:14:13Z")

</div>

> [@ScruffR](#):
>
> If you try flashing via
> 
> particle flash --usb firmware.bin

This works. The code is taking. Thank you!

How do you find the time to be so resourceful, dios mio.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 15, 2016, 4:19pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/7 "2016-10-15T16:19:26Z")

</div>

> [@markjones.cpe](#):
>
> How do you find the time to be so resourceful, dios mio.

Don't ask 😊 I probably should do other things more often 😉

---

<div class="post-metadata">

**Author:** ![KyleG](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kyleg/32/11077_2.png) [@KyleG](https://community.particle.io/u/KyleG)\
**Post date:** [October 15, 2016, 6:51pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/8 "2016-10-15T18:51:34Z")

</div>

Good to hear your code is working @markjones.cpe, thanks for the help @ScruffR!

---

<div class="post-metadata">

**Author:** ![BrianMoreau](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@BrianMoreau](https://community.particle.io/u/BrianMoreau)\
**Post date:** [February 10, 2017, 1:54pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/9 "2017-02-10T13:54:06Z")

</div>

Ok I am flashing OTA and software timers are not working for me either.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 10, 2017, 2:23pm UTC](https://community.particle.io/t/electron-v0-5-3-software-timers-dont-seem-to-work-at-all-solved/26540/10 "2017-02-10T14:23:50Z")

</div>

You’d need to provide some more info.  
What platform are you using?  
What system version?  
What does not work?  
Any error messages?

And please no double posting on multiple threads for the same problem.
