Jump to content
43oh

First time with Energia- possible bug?


Recommended Posts

Being that I'm new at these things, I thought I'd try some of the different IDE's out, so downloaded this and set about my way.

 

I loaded the "Blinky" sketch, sent it to the board and it ran fine- nice blinking green LED. Then I loaded the "Fade" sketch and had a pulsing green LED. Went into the code, changed the occurances of "GREEN_LED" to "RED_LED", sent that to the board and the red LED is not pulsing the same as the green was. At low brightness, it's barely visible and flickers then suddenly pops up to full on, then back to very low brightness and flickering.

 

FYI, it's a -G2553 chip on a 1.5 board just received from 43oh. The pre-loaded demo worked fine fading the red and greed led's in and out with temp.

Link to post
Share on other sites

Energia uses Timer output to generate PWM signal with varying duty cycle. P1.0 aka RED_LED is not on a timer output and hence analogWrite to that pin will not work. What it does instead is either set the pin high or low depending on the value written to it.

See the hardware pin mapping guide for what pins can be used for what functionality: https://github.com/energia/Energia/wiki/Hardware

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...