Show Posts
Pages: 1 ... 13 14 [15] 16 17 ... 19
211  Forum 2005-2010 (read only) / Interfacing / Re: Serial read from sensor on: October 28, 2009, 04:12:16 pm
Hi Andy,

Thanks for your reply.  Part of the problem is that I am very new to Arduino/MCU's - I'm kinda feeling my way slowly :-)

I am using a Duemilanove which I guess has just one real serial port which I was hoping to use but it sounds like a software serial is required for this board?

I'm rubbish at coding a the mo - learning slowly.  Would you be up for showing me, based on the code below, how to ask for 10 bytes and then printing them to a serial window?  Any help is appreciated as I have been on this for days now - failed to get I2C working and now failing at serial too !

Code:
#include <SoftwareSerial.h>

#define rxPin 3
#define txPin 4

SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);

void setup()  {

  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  softSerial.begin(9600);

  Serial.begin(9600);
}

void loop() {

  int data = softSerial.read();
  Serial.println(data);

}
 
212  Forum 2005-2010 (read only) / Interfacing / Re: Serial read from sensor on: October 28, 2009, 02:33:29 pm
Thanks for the help folks - the codes don't infact resemble the desired ASCII output !!!

If I take out the ATMEGA328 chip - connect the sensor to pin 1 (TX) - open the serial port at BAUD 38400 - I can see the expected data delivered every 3 seconds as documented - this is the format:

  857 ppm
  853 ppm
  850 ppm
  851 ppm
  850 ppm

I have no idea how to access this data via C however - I understand the suggestions made and have tried them - the only one I'm not sure about is how to ask for 10bytes and then print them out in the correct format?  I guess the 10 byte output for 857 ppm in decimal would be:
32 56 53 55 32 112 112 109 13 10 (last two being carriage return and linefeed) - this is nothing like the output I'm getting?
213  Forum 2005-2010 (read only) / Interfacing / Re: Serial read from sensor on: October 28, 2009, 05:08:26 am
Hi,

The output looks like below - I guess I need to somehow group these bytes into 10 and convert to ASSCI?

-1
161
255
49
33
213
49
33
213
49
233
244
49
233
244
49
161
244
214  Forum 2005-2010 (read only) / Interfacing / Re: Serial read from sensor on: October 28, 2009, 03:09:49 am
Thanks Andy,

Here is one try :

Code:
void setup()
{  
  Serial.begin(9600);
}

void loop()
{  
  int data = Serial.read();
  Serial.println(data);
  delay (1000);
}

And another using SoftwareSerial:


Code:
#include <SoftwareSerial.h>

#define rxPin 3
#define txPin 4

SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);

void setup()  {
  
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  softSerial.begin(9600);

  Serial.begin(9600);
}

void loop() {
  
  int data = softSerial.read();
  Serial.println(data);
  
  delay (1000);
}
215  Forum 2005-2010 (read only) / Interfacing / Serial read from sensor on: October 27, 2009, 07:16:35 pm
Hi,  Sorry, this is a very basic question.  I am trying to pickup 10 ASCII characters being output from a sensor but not making much progress!!!  I have plugged the sensor TTL TXD into Arduino RX pin and using simple Serial.read() to try and get the string of 10 bytes output at 9600 and Serial.println to output - I guess my code is way off - what would be the best way to do this?
216  Forum 2005-2010 (read only) / Troubleshooting / Re: Sensirion Temp/Humidity sensor library help on: November 20, 2010, 02:19:51 pm
Just a quick note to say thanks for the help posted here, especially tasasaki who cracked the resolution issue which had me foxed for quite some time  smiley

I have this all working nicely now on a Seeeduino Stalker data logger and have posted a small write up along with the Arduino Sketch:

http://www.airsensor.co.uk/component/zoo/item/temperature-humidity-logger.html
217  Forum 2005-2010 (read only) / Development / Temperature display on 8 segment displays on: September 08, 2010, 11:43:43 am
Hi,

I'm still not very good at electronics but would like to be able to build a temperature display for our local outdoor swimming pool which is run for the community by volunteers.  Over the months I have collected various bits of hardware to build one as a gift but I don't think I can do it without help.... would anyone be able to hold my hand and guide me through the circuit and arduino sketch to get it working?

The kit I have is:

Seeeduino 168 board
Dallas 18B20 - 1 wire temperature sensor
74HC165N shift registers x 4
75mm high 8 (10pins) segment LED display units x 4
prototype board
resitors

Anyone interested :-)
218  Forum 2005-2010 (read only) / Development / Re: Large LED display for temperature. on: October 13, 2009, 05:49:54 am
Hehe, now that would be fun :-)
219  Forum 2005-2010 (read only) / Development / Re: Large LED display for temperature. on: October 12, 2009, 10:55:56 am
Hi Mike,

Thanks, even bigger :-)  But like you say not inexpensive - maybe I will ask if they will help out with a charity project :-)

Cheers.
220  Forum 2005-2010 (read only) / Development / Re: Large LED display for temperature. on: October 12, 2009, 10:37:16 am
Hi Programmer - that's perfect - many thanks... wonder if these are available in the UK?.... nothing showing on the Google.
221  Forum 2005-2010 (read only) / Development / Large LED display for temperature. on: October 11, 2009, 04:01:41 pm
Hi,

A am looking to make a large LED display for our local community swimming pool - numbers may be 150 to 300mm tall with the units at the end ..... so something like 28.4~C (~ = degree symbol).  Could be segment or matrix.

I guess this has been done before but any tips on how to achieve this in a simple, cost effective manner would be great  smiley

Cheers
222  Forum 2005-2010 (read only) / Interfacing / Remote SD card breakout PCB on: November 24, 2010, 01:17:30 pm
Hi,

I am hoping to make a little breakout PCB so that I can remotely mount an SDcard away from a microSD shield.... I'm not great at electronics but I thought perhaps this simple task should be possible for me :-)  Anyway, I have sketched out how I think it should work in Eagle but was wondering if anyone with keen eyes can spot any problems?

The basic aim is to run wires from the microSD card slot on the shield to the SD card slot on the breakout - allows a bigger more robust card to be used and mounted where I can get at it :-)

Any thoughts appreciated.....



223  Forum 2005-2010 (read only) / Interfacing / Re: Analog value for IR Photodioide? on: October 26, 2010, 03:01:47 pm
Thanks for your help - very much appreciated.  My ultimate goal is to record when a wood burner is on and to what degree (without contact) - I figured infra red is the way to go but I need to do some testing - now that I can get some sort of sensor output I can see how it might help me record the info I'm looking for.

Thanks again :-)
224  Forum 2005-2010 (read only) / Interfacing / Re: Analog value for IR Photodioide? on: October 25, 2010, 04:54:34 pm
No change but I tried the same setup on a 328 board (I was using a 168) and now I'm getting results :-)  The value is high when the is no IR and low when there is... is this right?

Not sure about the 168 board - it should work the same I guess?
225  Forum 2005-2010 (read only) / Interfacing / Re: Analog value for IR Photodioide? on: October 25, 2010, 04:22:54 pm
Ooops..

Now wired as below but I get the same result?

PhotoDiode Short leg to Arduino Analog pin 0
PhotoDiode Long leg to Arduino GND
PhotoDiode Short leg to Arduino +5v using 10K ohm resistor

Pages: 1 ... 13 14 [15] 16 17 ... 19