Show Posts
Pages: [1] 2 3 ... 59
1  Using Arduino / Project Guidance / Re: RSSI-urgent help on: August 28, 2014, 03:02:23 pm
Did you look at the other thread I mentioned and get the code for obtaining the RSSI figure from your XBee?
Is it working and giving you a value?

Assuming so, take your XBees outside and go for a walk.  Measure -- maybe in paces -- the distance and record the RSSI figures.  Record a lot of data -- like 100 observations at different distances.  Stick the data into excel or something and create a scatter plot.

Is there a useful correlation?  If so, you can fit a curve to the data and use that as a distance measurement.

Do the same thing indoors -- maybe in a long school hallway.
Then again, in a row of offices, moving one office farther each time.

It will make an interesting experiment, but you will discover that RSSI figures are only partly correlated to distance.  They will vary by the relative orientation of the two antennas and by the surrounding materials just as much as by distance.
2  Using Arduino / Project Guidance / Re: Reading the status of a digital pin on: August 27, 2014, 02:36:07 pm

I've been looking around in many tutorials

Your research skills want some improvement.
3  Using Arduino / Programming Questions / Re: Could I save more SRAM ? on: August 27, 2014, 02:21:34 pm
It's a different way to skin the same cat.

In addition to moving your strings into PROGMEM, where feasible, you might look at using smaller types.  There are a few places you are using int (2 bytes) where a uint8_t or int8_t (byte) type would do.
4  Using Arduino / Programming Questions / Re: Efficient Way of Sending Data via Serial on: August 27, 2014, 02:02:43 pm
HardwareSerial.cpp has a small buffer that it uses for outgoing data.  When you use print() and friends, and the data you are printing does not fit, then the print() blocks until space is available and the data can be sent.

Because your sketch spends some of its time blocked on print(), it misses some of the moments when millis() % 100  == 0.  This coupled with the very real likelihood that millis() % 100 of often not zero, even 100ms after a point that it WAS zero, as PaulS points out, is likely what you're seeing.

There is, unfortunately, no way to sense if there is space in the transmit buffer.  You can use flush() to wait for everything to be sent, but there is no async way to test if flush() or print() would block.  You would have to hack HardwareSerial.cpp to add this feature.
5  Using Arduino / Project Guidance / Re: RSSI-urgent help on: August 27, 2014, 11:01:37 am
Google found me all kinds of interesting stuff, including this:,59992.0.html
6  Using Arduino / Project Guidance / Re: Etch-resistant thermometer. on: August 27, 2014, 10:35:24 am
I am not sure how accurate a contactless infrared thermometer would be in this application, but it might be worth a go.
7  Using Arduino / Programming Questions / Re: Using pointers within a library on: August 27, 2014, 10:22:50 am
void IMUlib::readIMU(int16_t *aX, int16_t *aY, int16_t *aZ, int16_t *gX, int16_t *gY, int16_t *gZ){

void IMUlib::readIMUForm(int16_t *aX, int16_t *aY, int16_t *aZ, int16_t *gX, int16_t *gY, int16_t *gZ){
  readIMU(&aX, &aY, &aZ, &gX, &gY, &gZ);

In readIMUForm() aX, xY etc are pointers to int already.  There is no need to take THEIR addresses when passing to readIMU().

You probably want:

void IMUlib::readIMUForm(int16_t *aX, int16_t *aY, int16_t *aZ, int16_t *gX, int16_t *gY, int16_t *gZ){
  readIMU(aX, aY, aZ, gX, gY, gZ);
  *aX = *aX/16384;
8  Using Arduino / Project Guidance / Re: Need help to splitt a string that comes from serieport on: August 20, 2014, 11:53:53 am
Where does the string come from?  If your reading it character-by-character from a stream, I would say your best bet s to parse it on the fly.  If you have to parse the string in memory, have a look at strtok()

You can google for zillions of examples.  Your code would give <BS><CR><LF> ("\b\r\n") as delimiters, then look at the strings found.  The ones that aren't "" are what you are looking for.
9  Using Arduino / Programming Questions / Re: I cant insert code, please help..... on: August 18, 2014, 10:35:22 am
this is going to be very vague

Agreed: vague in the extreme.

It is not possible for anyone to help you without at least one of, and ideally both of:

(1) the whole actual sketch you are struggling with, and
(2) the whole actual error messages given by the IDE when you build it.

is there a tutorial about when, where, why and how to use the "{ }" syntax
10  Using Arduino / Project Guidance / Re: ultrasonic ground speed detection on: August 18, 2014, 09:58:52 am
Think ball-less mouse.

I was reading this:

I wonder if you could replace the lens system in a mouse's optical imager to focus on the ground 15cm below and just use the mouse's movement outputs to read the speed, direction, distance traveled and so forth.

I have a vague idea to try placing a parallax ping style sensor at a 45-degree angle to the direction of travel and see if there is a detectible shift in the distance it reads with relative movement.  That would be a simple experiment to try, even if it is unlikely to be successful.
11  Using Arduino / Project Guidance / Re: Animatronic Iron Man Suit Feasibility on: August 18, 2014, 09:34:37 am
Most RFID systems would not read very well through a (distance equivalent to a) persons head, so I think you'd need separate readers on each side.  In this case it would be fine to use the same tag on both sides, as the logic depends on which side reads the tag.  Two readers within 20cm of each other might cause some interference.  It might be desirable to power them alternately rather than both simultaneously.

If you wound your own coil for an ID02, you might get reasonable readings on both sides.  A coil could be mounted inside the mask, canted so that it passes on one side of the eyes and on the other side of the neck.

All of this would require trying it to see what works.

12  Using Arduino / Project Guidance / Re: 6' Groundwater Level Meter on: August 15, 2014, 10:39:15 pm
I originally got started after reading this:
They reported that a 50mm (2-inch) pipe resulted in limited range.  I only needed 1,000 mm range or so, but I went with a 100mm pipe, mostly because that was available.  My sensor is a seeed studio one that operates the same as the parallax ping.

The parts you'd need to have to just experiment a bit are pretty cheap.  I would recommend buying a couple of the cheaper ones and just see how it all works.

In my application I run the sensor, an Arduino pro, a 433MHz radio and some other electronics from a 7Ah gel cell.  It draws about 25mA on average, reading the water level every 15 secs or so.
13  Using Arduino / Project Guidance / Re: Arduino Wireless Configuration Parameter to Control via RS232 on: August 15, 2014, 09:00:21 am
is it generell possibile to get this szenario done? 

Yes, of course it is possible.  Go for it.
14  Using Arduino / Programming Questions / Re: Pass const char [4][20] PROGMEM into function on: August 14, 2014, 10:06:31 pm
Something like this would work

void init_menu(const char menu[][20])
  char sbuff[20];
  for( uint8_t i=0; i<4; i++ )
    lcd_set_cursor( 0, i );
    strcpy_P( sbuff, &menu[i][0] );
    lcd_print_string( sbuff );


It would be an idea to use a zero-length string to end your menu, then the loop can loop until strlen(sbuff) == 0.  That way your menus don't have to have exactly 4 entries.
15  Using Arduino / Project Guidance / Re: 6' Groundwater Level Meter on: August 14, 2014, 08:55:44 pm
I have been reasonably successful measuring water level in a 100mm ABS tube using a parallax ping style sensor like this one:

I would say that that accuracy is closer to +/- 15mm than the 2mm some models claim.  There are dozens of versions of these things.  I've seen them as cheap as $3 on ebay.

For a permanent installation in a humid/damp location, you might want to try a weatherproof sensor.  Those will cost a bit more.  There are tons to choose from.  Here's a supplier for a range of options:
Pages: [1] 2 3 ... 59