User Tools

Site Tools


oak:tutorials:blink

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
oak:tutorials:blink [2016/03/22 13:58]
jwhendy
oak:tutorials:blink [2016/03/23 16:26]
jwhendy
Line 73: Line 73:
 This code tells the Oak that we will be using pin 1 as an output, and then loops over and over sending a ''​HIGH''​ signal to pin 1 (turns the LED on), waits 1 second, and then turns the LED off by sending a ''​LOW''​ signal. This code tells the Oak that we will be using pin 1 as an output, and then loops over and over sending a ''​HIGH''​ signal to pin 1 (turns the LED on), waits 1 second, and then turns the LED off by sending a ''​LOW''​ signal.
  
-You can find a template like this in the Arduino IDE under ''​File -> Examples -> Oak Examples -> Start''​. Otherwise, start a new sketch and copy/paste the above into your file. Make sure the port and board selections are correct and then upload the code (the button above the text window with a right arrow icon). You should see this in the message area at the bottom of the Arduino window:+You can find a template like this in the Arduino IDE under ''​File -> Examples -> Oak Examples -> Start''​. Otherwise, start a new sketch and copy/paste the above into your file. With your Oak plugged powered on, make sure the Arduino ​board selection is correctand then upload the code with the button above the text window with a right arrow icon
 + 
 +[[http://​digistump.com/​wiki/​_media/​oak/​tutorials/​upload.png|{{http://​digistump.com/​wiki/​_media/​oak/​tutorials/​upload.png?​300}}]] 
 + 
 +You should see this in the message area at the bottom of the Arduino window:
  
 <​code>​ <​code>​
Line 89: Line 93:
 [[http://​digistump.com/​wiki/​_media/​oak/​tutorials/​blink-simple.gif|{{oak:​tutorials:​blink-simple.gif?​300}}]] [[http://​digistump.com/​wiki/​_media/​oak/​tutorials/​blink-simple.gif|{{oak:​tutorials:​blink-simple.gif?​300}}]]
  
-===== Code: changing LED behavior ​=====+=== changing LED behavior ===
  
 Now that you have a general idea of how to turn a light on and off, what else could you do? How might you make the blink shorter or longer? What do you think this changed code might do? (Hint: compare the delay values after each step!) Now that you have a general idea of how to turn a light on and off, what else could you do? How might you make the blink shorter or longer? What do you think this changed code might do? (Hint: compare the delay values after each step!)
oak/tutorials/blink.txt · Last modified: 2016/03/23 16:26 by jwhendy