30 december 2011
Arduino NEXA
Arduino
https://code.google.com/p/arduino-nodo/issues/attachmentText?id=33&aid=77920028636723490&name=nexa+protocol.txt&token=96bfee27292cb534de328bf6ea88b531
http://www.elektronikforumet.com/forum/viewtopic.php?f=3&t=11720&start=105
NEXA string examples
-----------------------
o = 320µs high, 960µs low, 320µs high, 960µs low
x = 320µs high, 960µs low, 960µs high, 320µs low
turn OFF house A, unit 2: "ooooxooooxxo+"
house id unit unknown activation stop bit
oooo xooo oxx o +
turn ON house C, unit 8: "oxooxxxooxxx+"
house id unit unknown activation stop bit
oxoo xxxo oxx x +
SARTANO string examples
--------------------------
0 = 360µs high, 1100µs low, 1100µs high, 360µs low
X = 360µs high, 1100µs low, 360µs high, 1100µs low
turn OFF house id 35, channel 2: "00X0X0X0000X+"
house id channel activation stop bit
00X0X 0X000 0X +
turn ON house id 124, channel 1: "XX0X0X0000X0+"
house id channel activation stop bit
XX0X0 X0000 X0 +
ex.
sendstringrf("oxooxxxooxxx+"); //NEXA
sendstringrf("XX0X0X0000X0+"); //Sartano
void sendstringrf(char *str)
{
char i, j;
for(i = 0; i < 4; i++)
{
j = 0;
while (*(str+j) != '\0')
{
sendrf(*(str+j));
j++;
}
}
}
void sendrf(char v)
{
switch (v)
{
case '0':
PORTD |= _BV(RFD);
_delay_us(350);
PORTD &= ~_BV(RFD);
_delay_us(1100);
PORTD |= _BV(RFD);
_delay_us(1100);
PORTD &= ~_BV(RFD);
_delay_us(350);
break;
case 'X':
PORTD |= _BV(RFD);
_delay_us(350);
PORTD &= ~_BV(RFD);
_delay_us(1100);
PORTD |= _BV(RFD);
_delay_us(350);
PORTD &= ~_BV(RFD);
_delay_us(1100);
break;
case 'o':
PORTD |= _BV(RFD);
_delay_us(320);
PORTD &= ~_BV(RFD);
_delay_us(960);
PORTD |= _BV(RFD);
_delay_us(320);
PORTD &= ~_BV(RFD);
_delay_us(960);
break;
case 'x':
PORTD |= _BV(RFD);
_delay_us(320);
PORTD &= ~_BV(RFD);
_delay_us(960);
PORTD |= _BV(RFD);
_delay_us(960);
PORTD &= ~_BV(RFD);
_delay_us(320);
break;
case '+':
PORTD |= _BV(RFD);
_delay_us(360);
PORTD &= ~_BV(RFD);
_delay_ms(8);
break;
}
}
28 december 2011
26 december 2011
Elektronik
UPM Väderstation
http://wiki.nethome.nu/doku.php/modupm
http://www.youtube.com/watch?v=3itu7S7B1AQ&feature=related
http://www.electrokit.com
P8055
http://www.velleman.eu/downloads/0/illustrated/illustrated_assembly_manual_k8055_uk_rev3.pdf
http://www.velleman.eu/support/downloads/?code=K8055
Ocsilloskop
http://www.kjell.com/sortiment/el/verktyg/matinstrument/oscilloskop/velleman-hps140i-p48141
Arduino
http://www.arduino.cc
http://arduiniana.org/libraries/newsoftserial/
http://wiki.nethome.nu/doku.php/modupm
http://www.youtube.com/watch?v=3itu7S7B1AQ&feature=related
http://www.electrokit.com
P8055
http://www.velleman.eu/downloads/0/illustrated/illustrated_assembly_manual_k8055_uk_rev3.pdf
http://www.velleman.eu/support/downloads/?code=K8055
Ocsilloskop
http://www.kjell.com/sortiment/el/verktyg/matinstrument/oscilloskop/velleman-hps140i-p48141
Arduino
http://www.arduino.cc
http://arduiniana.org/libraries/newsoftserial/
Prenumerera på:
Inlägg (Atom)