Show Posts
Pages: [1]
1  Development / Other Software Development / Re: UPDATE - Linker Problem — Arduino Uno and Xcode (cont'd) on: January 31, 2012, 07:29:29 am
I've also ordered the WiFly wifi shield from Sparkfun.com so my arduino can speak tcp/ip
with the world. Do you guys have any experience with this, or have any other wifi shield
to reccommend?

I've been using the RN-171 from Roving Networks and just set it up to post to a PHP server every minute without interaction from the host controller. This way, you can power down everything except the WiFi module, it will read sensor data and post to a web server as the frequency you wish. I posted on the Roving FAQ at http://rovingnetworks.com/FAQs/Standalone_WiFi_modules_sending_data_to_web
2  Forum 2005-2010 (read only) / Bugs & Suggestions / Code to read EnOcean telegrams on: November 30, 2007, 09:26:17 am
This reads a TCM 120 connected to the serial port, and switches an LED on from the signals received from the wireless, batteryless transmitters.

This is the first part of my WLAN/email to EnOcean bridge I am developing.

Code:
// EnOcean reader
// Simple code to read an EnOcean telegram - does not check ID of transmitter at this stage, so will operate from ANY switch

int ledPin=13;
int packet[14];
int j;

void setup()
{
  Serial.begin(9600);
  pinMode(ledPin,OUTPUT);
  digitalWrite(ledPin,HIGH);
  delay(250);
  digitalWrite(ledPin,LOW);
  Serial.println("EnOcean TCM120 reader");
}
 
void loop()
{  
 
 while (Serial.available())
 {
   packet[j++]=Serial.read();
   j=j % 14;
   if(roly(j)==165 && roly(j+1)==90) //now we have sync bytes for packet
    {
     print_packet();
     if((roly(j+3)==5) && (roly(j+4)==80)) digitalWrite(ledPin,HIGH); //switch is pressed ON
     if((roly(j+3)==5) && (roly(j+4)==0 )) digitalWrite(ledPin,LOW);  //switch released
    }
 }  
}

void print_packet()
{
  int i;
  Serial.print("ORG:");   Serial.print(roly(2),HEX);
  Serial.print(" Data:"); for(i=4;i<=7;i++)  { Serial.print(roly(i),HEX); Serial.print(" "); }
  Serial.print("ID:");    for(i=8;i<=11;i++) { Serial.print(roly(i),HEX); Serial.print(" "); }
  Serial.print("ST:");    Serial.print(roly(12),HEX);
  Serial.print(" Chk:");  Serial.println(roly(13),HEX);
}

int roly(int n)
{
 return packet[n%14];
}

3  Forum 2005-2010 (read only) / Syntax & Programs / Re: can't print a float value??? on: February 06, 2007, 07:34:34 am
Thanks, but this is still a little confusing, so you are saying that printf is not available - although I have used it with integers?

But floating point is not available either? - but it is listed as an available data type.

I would really like to be able to use sprintf with strings at least.  I want to do some base64 encoding in the module to be able to send emails, so some string manipulation will be important!

Is there any documentation of what is and is not available from standard 'C'?
4  Forum 2005-2010 (read only) / Syntax & Programs / Re: can't print a float value??? on: February 05, 2007, 06:05:58 pm
I've seen a the same and similar problems, trying to use sprintf(dest,"%f %s",floatvalue,stringvalue);

Thinking that underneath the Arduino extensions there is C, I thought this would work, but does not?

Am I missing something simple (or being stupid) here?

Simon
5  Forum 2005-2010 (read only) / Development / Email and web server on: November 29, 2007, 04:54:13 am
Hi,

I am developing a system to connect to WiFi using a ConnectOne iWiFi Socket device - I just wonder if anyone has any experience with this - or any modem drivers?

This device is a serial to WiFi module, and has email client etc built-in.  I'm making a device to take in measurements from wireless and batteryless sensors using EnOcean STM 110 modules to monitor things like pond temperature, water flow and level and other sensors around the house, recieve them using an EnOcean TCM 120 connected to Arduino, then send email alerts using the ConnectOne module.

Biggest problem seems to be the fact I'll need two serial ports - one for the EnOcean receiver, and one for the WiFi module.  Any easy way of creating two 19,200bps serial ports on the board?
6  Forum 2005-2010 (read only) / Interfacing / Re: HMC6352 on: February 09, 2007, 01:39:14 am
How did you wire up to the HMC6352? - as I remember, it's a really small BGA chip?
7  Forum 2005-2010 (read only) / Interfacing / Re: Libelium GPRS module for Arduino power PROBLEMS!!! on: June 03, 2009, 08:20:35 am
The peak currents of over 2A required by GSM modules are very short, the average currents when offline should be under a couple of milliamps or so.  A capacitor should do it, providing it can supply the peak current for the 477uS required...

www.tdc.co.uk have a webshop with Cinterion modules and boxed modems, the boxed modems (called 'terminals') are easier to power from ordinary 12V power supplied.
8  Forum 2005-2010 (read only) / Interfacing / Interfacing to EnOcean on: June 03, 2009, 08:43:58 am
Thought I'd share this code that reads data from an EnOcean TCM120 so you can read data from the EnOcean wireless (and batteryless) sensors.  Great for remote control and monitoring applications!

// EnOcean reader
// Simple code to read an EnOcean telegram - does not check ID of transmitter at this stage, so will operate from ANY switch

int ledPin=13;
int packet[14];  //used as a rotational buffer
int j=0;

void setup()
{
  Serial.begin(9600);
  pinMode(ledPin,OUTPUT);
  digitalWrite(ledPin,HIGH);
  delay(250);
  digitalWrite(ledPin,LOW);
  Serial.println("EnOcean TCM120 reader");
  //send_packet(0xAB,0x48,0,0,0,0,0,0,0,0);
}
 
void loop()
{  
 while (Serial.available())
 {
  // Serial.print(packet[j],HEX); Serial.print(" ");
  packet[j++]=Serial.read();
  j=j % 14;
  if((roly(j)==0xA5) && (roly(j+1)==0x5A))
  {
   print_packet(j);
   if(roly(j+2)==0x0B) //now we have sync bytes for receive packet
   {
    if((roly(j+3)==5) && (roly(j+4)==80)) digitalWrite(ledPin,HIGH); //switch is pressed ON
    if((roly(j+3)==5) && (roly(j+4)==0 )) digitalWrite(ledPin,LOW ); //switch released
   }
  }
 }  
}

void print_packet(int j)
{
  int i,ch=0;
  Serial.print("ORG:");   Serial.print(roly(j+3),HEX);
  Serial.print(" Data:"); for(i=j+4;i<=j+7;i++)  { Serial.print(roly(i),HEX); Serial.print(" "); }
  Serial.print("ID:");    for(i=j+8;i<=j+11;i++) { Serial.print(roly(i),HEX); Serial.print(" "); }
  Serial.print("ST:");    Serial.print(roly(j+12),HEX);
  Serial.print(" Chk:");  Serial.print(roly(j+13),HEX);
  for(i=2;i<13;i++) ch=ch+roly(j+i);
  if((ch%0x100)==roly(j+13)) Serial.println(" OK"); else { Serial.print(" "); Serial.print(ch,HEX); Serial.println(" Error"); }
}

void send_packet(int typ,int cmd,int D3,int D2,int D1,int D0,int D_3,int D_2,int D_1,int D_0)  //not tested
{
  Serial.print(0xA5,BYTE);
  Serial.print(0x5A,BYTE);
  Serial.print(typ,BYTE);
  Serial.print(cmd,BYTE);
  Serial.print(D3,BYTE);
  Serial.print(D2,BYTE);
  Serial.print(D1,BYTE);
  Serial.print(D0,BYTE);
  Serial.print(D_3,BYTE);
  Serial.print(D_2,BYTE);
  Serial.print(D_1,BYTE);
  Serial.print(D_0,BYTE);
  Serial.print(0,BYTE);
  Serial.print(0xff & (typ+cmd+D3+D2+D1+D0+D_3+D_2+D_1+D_0));
}

int roly(int n)
{
 return packet[n%14];
}

9  Forum 2005-2010 (read only) / Interfacing / Re: Simplest way to interface with an MP3 player? on: February 06, 2007, 11:55:57 am
As long as you don't use the DB9 connector through a level converter, i.e. the SIL connector on the board, like the Arduino NG, then they are at TTL level.
10  Forum 2005-2010 (read only) / Interfacing / Re: Arduino NG as serial to usb adapter on: February 06, 2007, 08:18:44 am
Possibly a bit fundamental here - the output of your GPS is probably at RS232 levels - i.e. +/- 12V, the serial lines on the input of the USB chip are at 0 and 5V levels.  Doing this might blow up the USB chip on your NG board, I would not recommend it!
11  Forum 2005-2010 (read only) / Interfacing / Using serial port for a WiFi connection on: February 06, 2007, 07:08:56 am
Quick question - I want to connect my Arduino NG (USB) to a WiFi module which has all the TCP/IP etc, so I can send email statuses from my controller. http://www.tdc.co.uk/index.php?key=wism

BUT - the serial port is already committed to the USB port, I guess I have to power the board separately from an external PSU so that the USB chip is not powered up, otherwise it will conflict with an external serial device?

Is that right?

TIA, Simon
12  Forum 2005-2010 (read only) / News / Re: Why the Arduino Matters (article) on: June 03, 2009, 08:26:10 am
Or use WiFi and connect to a network to transfer data, you don't always HAVE to use GSM of course. This device is great for that - http://www.tdc.co.uk/index.php?key=nanowireach
13  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: GPRS vs GSM- Whats the Difference? on: June 03, 2009, 08:24:09 am
GSM is circuit switched data, i.e. like a normal modem connection. GPRS is only used to connect to the internet, so you will need to go through PPP sign in.

Some GPRS modules have the TCP/IP built-in, like the TC63i http://www.tdc.co.uk/index.php?key=tc63i for example, this makes it easier for non-TCP/IP aware devices to connect via the internet, send emails etc.
Pages: [1]