Recent Changes - Search:

Reference Links

Topics

Programming

Prior Class Pages

PM Wiki

edit SideBar

CodeExamples

Basic Button Stuff -

This code prints out a 1 when the user is currently pressing the button and a 0 when then are not pressing the button.

This code is missing a delay and toggles the output when the user presses the button. As such it doesn't reliably print out a 1 or a 0. Good example for why timing is important.

How to turn on and off 3 LEDs:

  • individually
  • with arrays
  • and with functions

Three examples in one:
http://jasonkrugman.com/classes/code/individual_array_and_functions.zip

Using the above code to write routines for a group of solenoid instruments
http://jasonkrugman.com/classes/code/code_for_programming_solenoids.zip

Basic Touch Sensing with Arduino. The circuit one wire plugged into A0 and another plugged into +5V. When depending on whether you touch just the A0 wire, or almost touch the A0 wire, or touch both wires, you will get different degrees of certainty. In many cases, static electricity in the air will be enough to trigger a false positive. The below code starts in on data averaging, but doesn't go very far. Needs another example using Millis() as well.

Write Your Own - Beginning Data Averaging... this code is very rudimentary, but it can be built up using Millis() to do timing http://jasonkrugman.com/classes/code/touch_sensor_examples.zip

Edit - History - Print - Recent Changes - Search
Page last modified on February 08, 2016, at 09:54 PM