In order to view what Hani is doing at the book shelf area, setting up an IP camera is required. I’ve done this before when taking Networked Objects, but again, all documentation are gone, so I decided to document it online this time.
AXIS 207 W Network Camera : Go online and download “IP Utility” software. Notice that this is only for windows os so you need a pc to use it.
For me, copying the java script from Live View to embed it on my website. And more importantly, format of video is desired to be ‘image mpeg’, not motion mpeg. This way the video will have less buffer when streaming.
I might use this library for later use. The source is here.
This is always confusing. Last semester’s Networked Objects class notes are all deleted accidentally, so I had trouble recollecting every bits until I finally got phpSocket php code working!
So, now Hanimustav is remotely working via internet, rest of it would be to come up with polished html, php code combo.
Things that I wouldn’t want to forget about merging XPort and Arduino:
I often forget where the code is saved in my local drive after the project is done. This took me ‘some’ time to figure out how to get interactions from both physical button and computer keyboard. Now the circuit works properly.
////////Aram Chang/////////
///2009 - 4 - 11//////////
///HANIMUSTAV////////
// choose the input pin (for a pushbutton)
int bttnPin1 = 2; //RED
int bttnPin2 = 3; //BLUE
int bttnPin3 = 4; //YELLOW
int bttnPin4 = 5; //GREEN
int bttnPin5 = 6; //ORANGE
// choose the pin for the sol
int solPin1 = 7; //RED Solenoid
int solPin2 = 8; //BLUE
int solPin3 = 9; //YELLOW
int solPin4 = 10; //GREEN
int solPin5 = 11; //ORANGE
// variable for reading the pin status
int RED1 = 0; //RED
int BLUE2 = 0; //BLUE
int YELLOW3 = 0; //YELLOW
int GREEN4 = 0; //GREEN
int ORANGE5 = 0; //ORANGE
char inByte; // for incoming bytes
int status; // whether or not you’re connected
void setup() {
Serial.begin(9600); // start serial communication at 9600bps
pinMode(solPin1, OUTPUT); // declare sol as output
pinMode(bttnPin1, INPUT); // declare pushbutton as input
pinMode(solPin2, OUTPUT); // declare sol as output
pinMode(bttnPin2, INPUT); // declare pushbutton as input
pinMode(solPin3, OUTPUT); // declare sol as output
pinMode(bttnPin3, INPUT); // declare pushbutton as input
pinMode(solPin4, OUTPUT); // declare sol as output
pinMode(bttnPin4, INPUT); // declare pushbutton as input
pinMode(solPin5, OUTPUT); // declare sol as output
pinMode(bttnPin5, INPUT); // declare pushbutton as input
digitalWrite(solPin1, LOW);
digitalWrite(solPin2, LOW);
digitalWrite(solPin3, LOW);
digitalWrite(solPin4, LOW);
digitalWrite(solPin5, LOW);
}
void loop(){
/*
// read new characters into a string:
if (Serial.available()) {
inByte = Serial.read();
}
if (inByte == ‘A’){
digitalWrite(solPin1, HIGH);
}
else{
digitalWrite(solPin1, LOW);
}
//delay(100);
if (inByte == ‘B’){
digitalWrite(solPin2, HIGH);
}
else{
digitalWrite(solPin2, LOW);
}
//delay(100);
*/
//RED
if (Serial.available()) {
inByte = Serial.read();
}
RED1 = digitalRead(bttnPin1); // read input value
if (RED1 ==LOW || inByte ==’g’){
digitalWrite(solPin1, HIGH);
}
else{
digitalWrite(solPin1, LOW); // turn sol OFF
}
//BLUE
BLUE2 = digitalRead(bttnPin2); // read input value
if (BLUE2 ==LOW || inByte ==’h’){
digitalWrite(solPin2, HIGH);
}
else{
digitalWrite(solPin2, LOW); // turn sol OFF
}
//YELLOW
YELLOW3 = digitalRead(bttnPin3); // read input value
if (YELLOW3 ==LOW || inByte ==’j’){
digitalWrite(solPin3, HIGH);
}
else{
digitalWrite(solPin3, LOW); // turn sol OFF
}
//GREEN
GREEN4 = digitalRead(bttnPin4); // read input value
if (GREEN4 ==LOW || inByte ==’k’){
digitalWrite(solPin4, HIGH);
}
else{
digitalWrite(solPin4, LOW); // turn sol OFF
}
//ORANGE
ORANGE5 = digitalRead(bttnPin5); // read input value
if (ORANGE5 ==LOW || inByte ==’l’){
digitalWrite(solPin5, HIGH);
}
else{
digitalWrite(solPin5, LOW); // turn sol OFF
}
}
Sealed Linear Solenoid Continuous Duty, Push, 1” Stroke, 30 oz Force
This is it. I decided to use this one. The form factor seems just right for mounting, and test result was satisfactory.
Sealed Linear Solenoid Intermittent, Push, 1” Stroke, 130 oz Force, 1.66” L
This turns out too ‘heavy duty’ so I’m returning it to the seller. I really liked the stroke it could provide (and also sounded very nice), but the pin itself was too heavy to be lifted again.