——-

Chit chat.

Looking at the ssh article in linux user, probably will play with that.

Made an awesome drink with blueberries, banana, ice and a little water.

Storms do not obey traffic signs. Get out early if you can.

Screenshot from 2013-07-30 15:37:24

———————————————————————

Another web server for the Arduino that lets you turn on and off an led connected to pin 8.  Easiest start for building a home automation setup.

Web page;

Screenshot from 2013-08-06 11:22:41

Circuit:

Screenshot from 2013-08-06 11:07:30

<code>

/*
Web Server
A simple web server
Circuit:
* Ethernet shield attached to pins oA, 0B 0C, 0D
*/
//——————————————————————————————————-
#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0x48, 0xD3 };

// The IP address will be dependent on your local network:
// assign an IP address for the controller:

IPAddress ip(192,168,1,17);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255, 255, 255, 0);

// Initialize the Ethernet server library with the port you want to use.
EthernetServer server(80);
String readString;
//——————————————————————————————————-
//————————————————-
// Any extra codes for Declaration :

// Declare Pin 8 as an LED because thats what we will be connecting the LED to.You could use any other pin and would then have to change the pin number.
int led = 8;

//————————————————-
//——————————————————————————————————-
void setup()
{
//————————————————-

// Extra Set up code:
pinMode(led, OUTPUT); //pin selected to control

//————————————————-
//——————————————————————————————————-
//enable serial data print
Serial.begin(9600);

//start Ethernet
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
Serial.print(“Server is at “);
Serial.println(Ethernet.localIP());
Serial.println(“LED Controller Test 1.0”);
}
//——————————————————————————————————-
//——————————————————————————————————-

void loop()
{
// listen for incoming clients
EthernetClient client = server.available();
if (client)

{
Serial.println(“new client”);

while (client.connected())
{
if (client.available())

{
char c = client.read();

//read char by char HTTP request
if (readString.length() < 100)

{

//store characters to string
readString += c;
//Serial.print(c);
Serial.write(c);
// if you’ve gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
//if HTTP request has ended
if (c == ‘\n’) {
Serial.println(readString); //print to serial monitor for debuging
//——————————————————————————————————–
// Needed to Display Site:
client.println(“HTTP/1.1 200 OK”); //send new page
client.println(“Content-Type: text/html”);
client.println();
client.println(“<HTML>”);
client.println(“<HEAD>”);

//——————————————————————————————————–
//————————————————-

// what is being Displayed :

client.println(“<TITLE>Home Automation</TITLE>”);
client.println(“<center>”);
client.println(“</HEAD>”);
client.println(“<BODY>”);
client.println(“<H1>Home Automation</H1>”);
client.println(“<hr />”);
client.println(“<center>”);

client.println(“<a href=\”/?lighton\”\”>Turn On Light</a>”);
client.println(“<br />”);
client.println(“<br />”);
client.println(“<a href=\”/?lightoff\”\”>Turn Off Light</a><br />”);

client.println(“</BODY>”);
client.println(“</HTML>”);

delay(1);
//stopping client
client.stop();

//————————————————-
// Code which needs to be Implemented:
if(readString.indexOf(“?lighton”) >0)//checks for on
{
digitalWrite(8, HIGH); // set pin 4 high
Serial.println(“Led On”);
}
else{
if(readString.indexOf(“?lightoff”) >0)//checks for off
{
digitalWrite(8, LOW); // set pin 4 low
Serial.println(“Led Off”);
}
}
//clearing string for next read
readString=””;

// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
Serial.println(“client disonnected”);

}
}
}
}
}
}

</code>

———————————————————————

Two tv antenna variations from Squidoo that did not work that well.

SUNP0061

SUNP0056

———————————————————————

———————————————————————

Nexus 7 and the arduino.

arduino_nexus7

http://www.instructables.com/id/Nexus-7-and-the-Arduino/

———————————————————————

Screenshot from 2013-08-08 13:40:54

Blink it for the MSP4320. almost a duplicate for the Arduino.

g2553pinouts

<code>

/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.
// Pin 14 fpr Msp430 boards.
// give it a name:
int led = 14;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

</code>

———————————————————————

Now might be a good time to look at using chkrootkit and rkshunter.

$ sudo apt-get install rkshunter chkrootkit

$ sudo rkunter –update

$ sudo rkhunter -c

———————————————————————

Quick way to find something on the network. (Replace 192.168.1.0 with your networks broadcast address)

$ ping -c 2 -b 192.168.1.0
WARNING: pinging broadcast address
PING 192.168.1.0 (192.168.1.0) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.637 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.490 ms

— 192.168.1.0 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.490/0.563/0.637/0.077 ms
$ sudo arp -a
thegateway (192.168.1.1) at 00:00:00:00:00:00 [ether] on eth0

———————————————————————

Untested.

sudo apt-get install @kde-desktop (or whatever the desktop you want)

———————————————————————

Ten second homemade mayonnaise..

P000-256-326-665-fb023

Good day..

Advertisements