Friday, October 23, 2009

My home temperature with arduino!

Purpose:
My home temperature with arduino!

URL:
http://sgez.homeip.net:888

Tools:
  • Internet connected router
  • Portforwarding to port 888 for ip 192.168.1.99 (arduino ethernet shield ip address)
  • Arduino Duemilanove
  • Arduino Ethernet Shield
  • A buzzer
  • Ethernet cable
  • Cable connectors
Difficulty / Time to complete:
Intermediate / 30 minutes

Schematic / Arduino code:
The following abstract schematic was used:

Saturday, October 17, 2009

Tutorial: First Arduino program - Kit's lights

Purpose:
Flash 4 leds from right to left and left to light.

Difficulty / Time to complete:

Beginner / 5 minutes

Tools:

  • Arduino board (tested on duemilanove)
  • 4 LEDs
  • 1 switch
  • 1 10K/.25W resistor
  • Workstation with Arduino 0.017 or higher
Arduino code:
int leds[]={10,11,12,13};   //pins with leds
const int dl = 75; //delay between moving
const int btn = 9; //button pin
int btnS = 0; //button state
int i=0; //general purpose counter

void setup(){
for(i=0;ipinMode(leds[i],OUTPUT);
}
pinMode(btn,INPUT);
myflash(leds,sizeof(leds),dl,false);
myflash(leds,sizeof(leds),dl,true);
}

void loop(){
btnS = digitalRead(btn);

if(btnS == HIGH){
myflash(leds,sizeof(leds),dl,false);
myflash(leds,sizeof(leds),dl,true);
delay(250);
}
else{
for(i=0;idigitalWrite(leds[i],LOW);
}
}

//myflash function: flash an array of pins to the R or L
void myflash(int arr[],int size,int delay1,boolean reverse){
int j = 0;
if(reverse==true){
for(j=(size-1);j>=0;j--){
digitalWrite(arr[j],HIGH);
delay(delay1);
digitalWrite(arr[j],LOW);
}
}
else {
for(j=0;jdigitalWrite(arr[j],HIGH);
delay(delay1);
digitalWrite(arr[j],LOW);
}
}
}
Note: After copying-pasting code to the Arduino IDE, press Ctrl+T to fix indents.

The final product (video):

Wednesday, October 14, 2009

Arduino - first impressions

Open source at its best (both in hardware and software)!

Pros (+):

  • Nice, compact design
  • Usb interface
  • Broad source code from arduino.cc and other sites/blogs
  • Ready-made IDE/usb drivers
  • Linux/Mac/Windows portable (both IDE and PC-to-Arduino dev)
  • Easy PC-to-Arduino dev via the Processing Language
  • Very cheap!
  • Lots of shields available!
Cons(-):
  • Linux driver installation requires some more steps
  • Addictive
  • Must buy more shields (who wants to blink leds all day long?)!
I dual boot on my Eee PC 1000h (Windows Xp/Ubuntu 9.10b):there is a remarkable difference from the IDE to the sketch loading on the Atmel.

Tuesday, October 13, 2009

"Πόνος, ο"

Δύο χρήσιμα άρθρα:

ITBS
Έντονος εώς ανυπόφορος πόνος στην εξωτερική μεριά του γονάτου, φλεγμονή.

Piriformis syndrome
Έντονος Πόνος στο ισχίο.

Monday, October 12, 2009

Cosmote APNs for Android 1.5/1.6

The first list is for internet access, the second one defines MMS service for Cosmote (Operator in Greece):

LISTING 1 - INTERNET

Name
Cosmote Wireless Internet
APN
internet
MCC
202
MNC
01
APN type
default

LISTING 2 - MMS

Name
Cosmote MMS
APN
mms
MMSC
http://195.167.65.220:8002
MMS proxy
10.10.10.20
MMS port
8080
MCC
202
MNC
01
APN type
mms

Fields that are left as "Not set", are not mentioned because they have no values.

Works on Android 1.5 and 1.6 (> 4.2.9.1 32a magic bc1 kernel - Previous did not work for some reason - link)


More APN settings here: Cyanogenmod APN List

Thursday, October 08, 2009