Jump to content
43oh

Timing in Energia Code ?


Recommended Posts

The "BlinkWithoutDelay" example code that comes with energia (in the digital section) should get you going.

 

It looks like that library might function in Energia if copied over. I didn't see any references to Arduino specific HW while glancing through it.

thanks, i will try using the same arduino library tomorrow and tell you the result. the blink without delay example is really the first step to what i want but i guess i need more for more complicated codes ( like menus and changing displays etc)

 

** i made both clock and thermometer working and i have one display. i want to change the display to time to temperature for certain seconds. then i will want to make some menus that will use time as well etc.

Link to post
Share on other sites

Also have a look at this library: http://forum.43oh.com/topic/2861-energia-library-mstimer2/

This library is timer based and calls a user specified function after the set time.

Github page is here: https://github.com/freemansoft/build-monitor-devices/tree/master/ti_launchpad_rgb

Do keep in mind that this library uses Timer1 A0 and might conflict with other libraries like TimerSerial.

Link to post
Share on other sites

Also have a look at this library: http://forum.43oh.com/topic/2861-energia-library-mstimer2/

This library is timer based and calls a user specified function after the set time.

Github page is here: https://github.com/freemansoft/build-monitor-devices/tree/master/ti_launchpad_rgb

Do keep in mind that this library uses Timer1 A0 and might conflict with other libraries like TimerSerial.

i guess this is what i really need. i will test this tonight and write here the results.thanks.

Link to post
Share on other sites

d'oh. it didn't work. I'm using x4yz' s sRTC library in order to get time internally (also thermometer library) i have checked the sample code https://github.com/freemansoft/build-monitor-devices/blob/master/ti_launchpad_rgb/ti_launchpad_rgb.ino'>(link) so, i guess i need to call my own routines inside the void process_step() function.. i am tired and i will work on this more tomorrow. if things go wrong, i will try to do this with millis() , but i don't want to. it makes me get confused.. : ) thanks.

 

P.S. Compile Error Code:

TimerInternal_inttermo_working_v4.cpp:4:18: error: variable or field 'process_step' declared void
TimerInternal_inttermo_working_v4.cpp: In function 'void setup()':
TimerInternal_inttermo_working_v4.cpp:108:38: error: 'process_step' was not declared in this scope
TimerInternal_inttermo_working_v4.cpp: At global scope:
TimerInternal_inttermo_working_v4.cpp:125:18: error: variable or field 'process_step' declared void

 

 

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...