Arduino based Solar Panel Tracker

Arduino based Solar Tracker for Solar Panels

Works via two photoresistors.

20130331-090348.jpg

Here is the Arduino Sketch code I wrote for the tracker:

int lightPin = A0; //define a pin for Photo resistor
int ledPin=6; //define a pin for LED
int val= 1;
int lightPin1 = A1; //define a pin for Photo resistor
int ledPin5=5; //define a pin for LED
int val1= 1;
int setPoint19 = 20; // Trigger value
int setPoint25 = 25; // Trigger value
int setPoint29 = 29; // Trigger value
int setPoint35 = 35; // Trigger value

void setup()
{
Serial.begin(9600); //Begin serial communcation
pinMode( ledPin, OUTPUT );
pinMode( ledPin5, OUTPUT );
}

void loop()
{

val = (analogRead(lightPin)*1);

if (val < setPoint35) { analogWrite(ledPin, LOW); // It has got dark, turn the LED on.
}
else
{
analogWrite(ledPin, 255); // It is light again, turn the LED off.

}
Serial.print("val = ");
Serial.print(val ) ; //Write the value of the photoresistor to the serial monitor.
Serial.print(" lightPin = ");
Serial.print(analogRead(lightPin));
Serial.print(" lightPin /4-1= ");
Serial.println(analogRead(lightPin)/4-1); //Write the value of the photoresistor to the serial monitor.
//analogWrite(ledPin, val); //send the value to the ledPin. Depending on value of resistor
//you have to divide the value. for example,
//with a 10k resistor divide the value by 2, for 100k resistor divide by 4.
//Serial.println(analogRead(lightPin)/3); //Write the value of the photoresistor to the serial monitor.
delay(10); //short delay for faster response to light.

val1 = (analogRead(lightPin1)*1);

if (val1 < setPoint35) { analogWrite(ledPin5, LOW); // It has got dark, turn the LED on.
}
else
{
analogWrite(ledPin5, 255); // It is light again, turn the LED off.

}
Serial.print("val1= ");
Serial.print(val1 ) ; //Write the value of the photoresistor to the serial monitor.
Serial.print(" lightPin1= ");
Serial.print(analogRead(lightPin1));
Serial.print(" lightPin1/4-1= ");
Serial.println(analogRead(lightPin1)/4-1); //Write the value of the photoresistor to the serial monitor.
//analogWrite(ledPin, val); //send the value to the ledPin. Depending on value of resistor
//you have to divide the value. for example,
//with a 10k resistor divide the value by 2, for 100k resistor divide by 4.
//Serial.println(analogRead(lightPin)/3); //Write the value of the photoresistor to the serial monitor.
delay(10); //short delay for faster response to light.

}

Arduino Solar Tracker

Here is the Arduino sketch code I wrote that will move a 2-wire DC motor forward and reverse depending on which of 2 buttons is pressed:

#include

/*
* Switch and LED test program
*/

int ledPin = 5; // LED is connected to pin 12
int switchPin = 0; // switch is connected to pin 2
int val; // variable for reading the pin status
int ledPin6 = 6; // LED is connected to pin 12
int switchPin1 = 1; // switch is connected to pin 2
int val1; // variable for reading the pin status

void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as output
pinMode(switchPin, INPUT); // Set the switch pin as input
pinMode(ledPin6, OUTPUT); // Set the LED pin as output
pinMode(switchPin1, INPUT); // Set the switch pin as input
//Setup Channel A
pinMode(12, OUTPUT); //Initiates Motor Channel A pin
pinMode(9, OUTPUT); //Initiates Brake Channel A pin

}

void loop(){

delay(10);

val = digitalRead(switchPin); // read input value and store it in val
if (val == LOW) { // check if the button is pressed
digitalWrite(ledPin, HIGH); // turn LED on
//Serial.begin(9600); // set up Serial library at 9600 bps
//Serial.print("sw0 on: ");Serial.println(digitalRead(switchPin));

//forward @ full speed
digitalWrite(12, HIGH); //Establishes forward direction of Channel A
digitalWrite(9, LOW); //Disengage the Brake for Channel A
analogWrite(3, 255); //Spins the motor on Channel A at full speed

delay(3000);

//delay(10);
}
if (val == HIGH) { // check if the button is not pressed
digitalWrite(ledPin, LOW); // turn LED off
delay(10);

digitalWrite(9, HIGH); //Eengage the Brake for Channel A

//delay(1000);

}

delay(10);

val = digitalRead(switchPin1); // read input value and store it in val
if (val == LOW) { // check if the button is pressed
digitalWrite(ledPin6, HIGH); // turn LED on
//Serial.print("on: ");Serial.println(digitalRead(switchPin1));

//backward @ half speed
digitalWrite(12, LOW); //Establishes backward direction of Channel A
digitalWrite(9, LOW); //Disengage the Brake for Channel A
analogWrite(3, 255); //Spins the motor on Channel A at half speed

delay(3000);

delay(10);
}
if (val == HIGH) { // check if the button is not pressed
digitalWrite(ledPin6, LOW); // turn LED off
//Serial.print("1=off: ");Serial.println(digitalRead(switchPin1));

digitalWrite(9, HIGH); //Eengage the Brake for Channel A

delay(1000);

delay(10);
}

}

Donate Bitcoins

Donate Bitcoins

Send or Donate Bitcoins to me by sending to this bitcoin address

14uvCJPiMX5ztck1gAaPSw5MsyyopPPZox

Donate Bitcoins
Donate Bitcoins

Pictures from the Ronnie Mund Block Party Jamaican Getaway at the Rose Hall Hilton March

Just had an AWESOME weekend at the Ronnie Mund Jamaica Getaway at the Rose Hall Hilton resort in Montego Bay Jamaica.

All the guys were there! Ronnie Mund, Shuli Egar, JD Harmeyer, Beetlejuice, John Tole, Maddog Maddern and the lovely Danielle Stewart.

We had a blast! The comedy shows were funny and very diverse. The comedy workshop contest was pretty entertaining as well, and the winner walked away with $1000 cash courtesy of http://herdnot.com/. I went sailing, drinking, eating, and relaxing. It was a great trip thanks to the hard work of CleanBox Entertainment.

The Stern fans seemed to be the most happy! I think they truly enjoyed their experiences with the guys from the show! I know they had an awesome time at the comedy show. The trip offered an intimate, unique opportunity for these fans to be a little bit closer to their favorite show.

As former tour manager of the Killers Of Comedy Tour, and current Cleanbox Entertainment backoffice crew, this trip was not to be missed! Special Props goto Dan Young for his excellent services as Tour Manager of the Ronnie Mund Block Party.

Bitcoin Trading Crashes To $38 After .7 .8 Block Chain Fork Bug Announced

Bitcoin falls to $38 after block chain fork bug announced

Bitcoin Trading Crashes To $38 After .7 .8 Block Chain Fork Bug Announced

Today Bitcoin BTC$ crashed to $38 from $48 following news that a block chain fork has occurred. According to realtime chat on the official Mt.Gox Chat Room, the bug occurred after the .8 Bitcoin software version was released. For more information stay tuned….

Read all about it here! https://bitcointalk.org/index.php?topic=152030.0

MtGox.com has issued a statement stating :
Bitcoin blockchain issue – bitcoin deposits temporarily suspended
https://support.mtgox.com/entries/21477395-Bitcoin-blockchain-issue-bitcoin-deposits-temporarily-suspended

Bitcoin falls to $38 after block chain fork bug announced
Bitcoin falls to $38 after block chain fork bug announced

Windows 7 DOS Batch File to Open and Close Remote Computers’ CD/DVD Tray

CDME.bat Windows 7 DOS Batch File to Open and Close Remote Computers##Q## CD/DVD Tray

Sometime I get bored at work.

So I wrote this DOS batch file (cdme.bat) to open/close the CD/DVD tray on other peoples computers on the network.  It will ask you for the HOSTNAME of the target computer, and how many times you want to open/close the drive tray.  FUN FUN FUN :>

Requires:

EjectMedia32.exe

EjectMedia64.exe

LoadMedia.exe (all written by Uwe Sieber)

Requires Admin rights to the target.

Assumes that target##Q##s c:\ drive has default admin share enabled: “c$” for file copy/cleanup.

PSexec or PSTOOLS needed on computer running the batch, not the target.

 

 

rem CDME.bat Written by Galen Wollenberg 2013

@echo off
set /p hostname= Enter Target Computer HOSTNAME:

echo.
set /p reps= Open/Close tray how many times?:
echo.
set /a times = “reps”

echo copying files…
@echo off
copy ejectmedia32.exe \\%hostname%\c$\windows\temp
copy ejectmedia64.exe \\%hostname%\c$\windows\temp
copy loadmedia.exe \\%hostname%\c$\windows\temp

:CheckOS
echo.
echo Checking %hostname% for bits…
IF EXIST “%PROGRAMFILES(X86)%” (set bit=64) ELSE (set bit=32)
echo.
echo %hostname% is %bit% bits…
echo.
echo %times% total Open/Close cycles requested…
echo.
echo %reps% cycles remaining…
echo.

:CheckOS

IF EXIST “%PROGRAMFILES(X86)%” (GOTO 64) ELSE (GOTO 32)

:32
IF “%reps%” == “0” GOTO END
psexec \\%hostame% c:\windows\temp\ejectmedia32.exe d
rem wait 2 seconds
ping 192.0.2.2 -n 1 -w 2000 > nul
psexec \\%hostname% c:\windows\temp\loadmedia.exe d:
rem wait 2 seconds
ping 192.0.2.2 -n 1 -w 2000 > nul
set /a reps = reps – 1
cls
echo %times% total Open/Close cycles requested…
echo.
echo Ok, %reps% cycles remaining…

GOTO 32

:64

IF “%reps%” == “0” GOTO END
psexec \\%hostname% c:\windows\temp\ejectmedia64.exe d
rem wait 2 seconds
ping 192.0.2.2 -n 1 -w 2000 > nul
psexec \\%hostname% c:\windows\temp\loadmedia.exe d:
rem wait 2 seconds
ping 192.0.2.2 -n 1 -w 2000 > nul
set /a reps = reps – 1
cls
echo %times% total Open/Close cycles requested…
echo.
echo Ok, %reps% cycles remaining…
GOTO 64

:END
echo deleting files…
@echo off
del \\%hostname%\c$\windows\temp\ejectmedia32.exe
del \\%hostname%\c$\windows\temp\ejectmedia64.exe
del \\%hostname%\c$\windows\temp\loadmedia.exe

echo.
echo All Done! CD Tray opened/closed %times% times on %hostname% !
echo.
pause

 

 

Bitcoin Reaches All Time High of $43

Bitcoin has quadrupled in value in the past few months.

Today on March 5, 2013 Bitcoin hit a high of over $43.  A $100 investment before in Dec 2012 would give you about $400-500 return today.

I trade on MtGox.com.

bitcoin

Shuli for iPhone, iPod touch, and iPad on the iTunes App Store

Shuli for iPhone, iPod touch, and iPad on the iTunes App Store

Howard Stern Comedian SHULI EGAR‘s iPhone App written by Galen Wollenberg

Shuli – The iPhone App

Shuli Egar is a comedian who first appeared on the Howard Stern Radio Show in June 2003. When Stern moved to Sirius, Shuli was made the host of the “Miserable Men” show. He was later promoted to be an on-air reporter for Howard 100 news, focusing on stories about The Wack Pack and filling in for Lisa G and Steve Langford when they’re out.

His go-getter attitude landed him a full-time gig, which ballooned into coveted slots on the popular Stern Show roasts, as well as becoming a contributor to the Scott Ferrall Show and co-host of the Sirius Satellite Radio programs The Jay Thomas Show and Miserable Men.

As if contributing to four radio programs wasn’t enough, Shuli hit the road every weekend across the country as part of the Killers of Comedy tour, which featured a rotating cast consisting of Stern Show regulars such as Jim Florentine, Sal “the Stockbroker” Governale, Richard Christy, Yucko the Clown and Beetlejuice. Shuli, clad in his mustard-yellow Howard 100 News jacket, hosted each performance and got crowds amped with his unique and humorous looks at the “dangers” of smoking pot, life as a Jew and the behind-the-scenes antics of the Stern Show.

The Killers of Comedy ended its run, but Shuli is embarking on another trek across America with the Miserable Men Comedy Show starring Shuli and Miserable Men co-hosts Mark Byrnes and Mike Morse. The radio program – currently one of only two live weekend shows on Stern’s two stations – tackles male-related subjects in a no-holds barred approach and the tour promises to do just that and then some.

And Now, There’s an App for Shuli !

* Make Sure Your iPhone Is NOT on VIBRATE, The VOLUME is UP, and Your HAND doesn’t COVER the SPEAKER. *

What’s New in Version 1.1

+ Added iPad Support. Universal Binary.

Buy App In iTunes

Shuli Egar iPhone App

 

Christmas Audio Free for iPhone, iPod touch, and iPad on the iTunes App Store

Christmas Audio Free for iPhone, iPod touch, and iPad on the iTunes App Store written by Galen Wollenberg

Christmas Audio is the best iPhone and iPod Touch holiday sound effects app there is! With 16 different Christmas sounds, you can create your own festive music or sound effects. It’s the perfect office cheer app this holiday season! Entertain your kids for hours, they love it!

Also includes SHAKE capability. Just SHAKE your iPhone to play random Christmas sounds! If You Like It, Please Rate It! :> Thanks!

Create your own holiday tune or just cheer your friends. Don’t let its simplicity fool you, this app is very dynamic and entertaining! A must have for Christmas!

* THIS IS THE FREE VERSION. IT HAS 8 SOUNDS.

* UPGRADE to the FULL VERSION FOR ALL 16 SOUNDS!
Sounds include:
Frosty the Snowman
Have you been a Good Boy? (Santa)
Hallelujah
Merry Christmas (Group)
Ho-Ho-Ho (Santa)
Holly Jolly Christmas
Look a Lot Like Christmas
We Wish You a Merry Christmas
La La La La
Have you been a Good Girl? (Santa)
Merry Christmas
Rudolph
Sleigh Bells
Winter Wonderland
Mr. Grinch
Silver Bells

*If app crashes after install, you need to do one of these:

1. Reboot iPhone. Press & hold power button and then slide the red slider when it appears.

2. Turn up the volume. Make sure Vibrate mode is off. Move your hand away from the bottom speaker.

3. Update your iPhone to firmware 4.1 or higher. Plug it into iTunes. Click on Yourname’s iPhone from left menu. Click on update iPhone button in center screen.

What’s New in Version 1.1

+Updated code to iOS 4.1

Buy App In iTunes

 

 

 

Christmas Audio iPhone App
Christmas Audio iPhone App