Editing Arduino Theremin

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 17: Line 17:
 
To start this stage in the project open SerialLog1 and save it as SerialBrightness1. Now in another project ( LDR ) we had a light dependent resistor and blinked some LED's depending on the brightness.  Lets steal some of that code and add it to the current one SerialLog1.  Modify the code so that when the light goes from on to off the Arduino sends "light off" and when it goes from off to on it sends "light on", and finally when the light does not change the Arduino sends nothing.
 
To start this stage in the project open SerialLog1 and save it as SerialBrightness1. Now in another project ( LDR ) we had a light dependent resistor and blinked some LED's depending on the brightness.  Lets steal some of that code and add it to the current one SerialLog1.  Modify the code so that when the light goes from on to off the Arduino sends "light off" and when it goes from off to on it sends "light on", and finally when the light does not change the Arduino sends nothing.
  
A note on the light dependent circuit.  You need to use a resistor in series with the light dependent resistor, this combination lets a variable current flow through the circuit.  The voltage across the resistor will vary with the light brightness ( so will the voltage across the LDR, the two will total to 5 volts. )  What size resistor should you use?  Put the LDR in medium brightness and mesure its resistance with a ohm meter.  Use that value resistor then in medium light you will get 2.5 volts into the Arduino.
+
A note on the light dependent circuit.  You need to use a resistor in series with the resistor, this combination lets a variable current flow through the circuit.  The voltage across the resistor will vary with the light brightness ( so will the voltage across the LDR, the two will total to 5 volts. )  What size resistor should you use?  Put the LDR in medium brightness and mesure its resistance with a ohm meter.  Use that value resistor then in medium light you will get 2.5 volts into the Arduino.
  
 
Circuit:
 
Circuit:

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)