Dollar Tree Elf all dressed up |
Monday, December 12, 2016
Thanksgiving to New Year 2017
Saturday, October 22, 2016
Wednesday, July 06, 2016
Saturday, June 11, 2016
Wednesday, May 18, 2016
May 2016, a Queen of Hearts and a Halloween Kitty
Queen of Hearts from a Happy Heart Pattern |
Kool Kats a Laura Lunsford pattern Soft Dolls & Animals June 2016 |
Saturday, March 12, 2016
Tuesday, February 23, 2016
Sunday, February 14, 2016
Sunday, January 17, 2016
Learning about photoresistors
I tried setting up a circuit that included a photoresistor and the expected outcome didn't happen. OK, let's start with something simpler, let's test if the photoresistor is working. I found several versions of this program and here is what I wrote (copied). My first compile, missed a wiggly parenthesis. After a successful compile I downloaded the code to my arduino. Hmmm forgot a step, didn't go to tools and open the serial monitor, so I couldn't see the output. Finally, got it together and the program ran successfully, so I knew I was using a working photoresistor. Now I'll go back to the original program, Circuit 6 in the Vilros handbook and try again.
const int kPin_Photocell = A0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int value = analogRead(kPin_Photocell);
Serial.print("Analog Reading = ");
Serial.println(value);
if(value < 200){
Serial.println(" - Dark");
}else if (value < 400){
Serial.println(" - Dim");
}
else if(value < 600){
Serial.println(" - Light");
}
else if(value < 800){
Serial.println(" - Bright");
}
else{
Serial.println(" - Very Bright");
}
delay(1000);
}
const int kPin_Photocell = A0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int value = analogRead(kPin_Photocell);
Serial.print("Analog Reading = ");
Serial.println(value);
if(value < 200){
Serial.println(" - Dark");
}else if (value < 400){
Serial.println(" - Dim");
}
else if(value < 600){
Serial.println(" - Light");
}
else if(value < 800){
Serial.println(" - Bright");
}
else{
Serial.println(" - Very Bright");
}
delay(1000);
}
Thursday, January 07, 2016
Subscribe to:
Posts (Atom)