Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Blinking an LED


  • Please log in to reply
3 replies to this topic

#1 dfashbaugh

dfashbaugh
  • Members
  • 8 posts

Posted 10 December 2014 - 08:05 AM

Hi,

 

I'm trying to do something that is very simple (hello world level) on most controllers, but I can't seem to figure out how to do it on the Labjack. Does anyone have any example code or some guidance on how to simply make an LED blink at a constant frequency on the Labjack. 

 

I'm looking for a 1Hz or 2Hz frequency.

 

Thanks,

Dylan



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 December 2014 - 11:04 AM

See different techniques here:

 

http://labjack.com/s...form-generation

 

In your case, a likely technique would be "Software Timing, Command-Response Updates".

 

 

What are you using for software?



#3 dfashbaugh

dfashbaugh
  • Members
  • 8 posts

Posted 10 December 2014 - 04:09 PM

Thanks for your reply!

 

I am writing code for the Labjack with the C++ API.



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 December 2014 - 04:22 PM

You also need to look at this app note to decide if you can use a DO toggled between output-high and output-low, or if you need to do something different to get enough light from your LED:

 

http://labjack.com/s...es/driving-leds

 

I would just make a loop with your desired delay of 250ms or 500ms and in that loop call eDO to toggle the line.  Start with the easy function example.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users