Show Posts
Pages: 1 2 [3]
31  Products / Arduino Due / Re: Arduino Due Hardware Serial Confusion on: January 09, 2013, 07:20:30 am
You shouldnt need to use softserial on Due, since you already have 4 serial ports!

To select which one you want to send the command to, simply add the number of the serial port after the "Serial" state.

For example:

Serial.begin(9600); would affect TX0/RX0, since you didnt write a number.
Serial1.print("Hello"); would affect TX1/RX1.
Serial2.read(); would affect TX2/RX2.

I hope this helps!

BR

32  Products / Arduino Due / Disabling UART on Due? on: January 08, 2013, 02:20:28 pm
On the 8bit AVR you would use the "UCSR2B &= ~(_BV(RXEN2))"  command to disable a serial port on it (USART2 in this case).

Does anyone know how to do the same thing with Due?

BR
33  Products / Arduino Due / Re: PROGMEM not working? on: January 08, 2013, 12:17:58 pm
Arm doesn't have PROGMEM.  In theory, the DUE ide should have defined all the PROGMEM 'keywords' as nothing and all of the <xxx>_P functions as <xxx>, but maybe they missed a few places.

If you are only programming on the Due, and no longer target the AVR based microprocessors, just take out the PROGMEM stuff.  If you need to run on both platforms, then you probably should do something like:

Code:
#if defined(__arm__) && !defined(PROGMEM)
#define PROGMEM
#define PSTR(STR) STR
#endif

You probably need more than that, depending on your program.

Ok, got the point! I am currently developing some stuff that should work on both platforms (for performance issues), so i'll stick to what you mention.

Thanks for the tips!

BR
34  Products / Arduino Due / PROGMEM not working? on: January 08, 2013, 09:54:05 am
Well, i have a sketch that passes the check and works on Mega2560 on 1.0.3 and 1.51, but i just tried to compile it for Due (with 1.51 ) and it is returning an error.

The error comes from this line of code:

Code:
const char ArduBytes[] PROGMEM = {0x32,0x11,0xE5,0x10,0x12};

The error that 1.51 returns is "expected initializer before 'PROGMEM'".

Is it a sw error or am i doing something wrong?

BR
35  Development / Suggestions for the Arduino Project / Re: Is Arduino Due coming? on: September 13, 2012, 02:04:10 am
I just hope they enable Analog Comparators on this one, because it would be simply hilarious to be able to use video experimenter on this one...


BR
36  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: August 21, 2012, 06:17:44 pm
Your code works fine for me.  I guess a loose connection could the the source of the problem.  But, it could also be that you're trying to get a ping that's just too far away.  These sensors really don't work all the way out to 400 or 500cm.  They seem to work okay to about 200cm for most, but I have some sensors that won't read anything consistently beyond around 75cm.  This is the fault of the sensors, not the library as the same thing happens with other libraries or with no library at all.  Try putting something 50cm away from the sensor and see what happens then.  It's just suspicious that it stops working around 200cm and then in your next test all the results are within 200cm.  Maybe it would work without you holding the sensor if all the readings were <50cm?  But, if it is a lose connection, that could also be why it's crashing after a few minutes, it's simply shorting out.  BTW, I've *never* got a zero reading that wasn't for a logical reason and I've *never* had any of my Arduino or Teensy 2.0 crash while using the NewPing library.  And, I've sometimes ran them for several hours or even overnight without a single issue.

Tim

Yeah, as i say, it was all due to loose connections. I just got everything soldered, and now i get 0 only when its out of range. Both tests you see above where done in the same room, where i should get no zeros at all since its pretty small.

I guess the "arduino stops working" would be due to some data generated by the loose connection that would cause an overflow.

Everything working pretty much perfect right now!

BR
37  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: August 21, 2012, 03:03:13 pm
I have some very good news for ppl with so many "0".

The issue is not the library (NewPing). The issue are the connections between the sensor and the board. I just found out that, if i hold tight the connections in the sensor with my hand, i get these results:

Code:
38 54
38 54 16
34 196
34 196 162
199 198
177 197
177 197 20
172 195
172 195 23
171 171
195 170
195 170 25
109 59
109 59 50
96 46
96 46 50
58 75
58 75 17
55 195
55 195 140
196 83
196 83 113
176 0
176 0 176
171 175
169 195
169 195 26
195 169
195 169 26
194 61
194 61 133
90 137
90 137 47
196 57
196 57 139
111 61
111 61 50

With same code as posted in post above this one, moving the sensor all around my room.

So, hope this helps!

BR
38  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: August 21, 2012, 02:31:24 pm
First of all, thanks for the great job you are doing!

Now, i wanted to comment two issues i am having.

First one is the "0" thing. I still get it too often, but i have found some "logic" sequence on it.

Here are some results:
Code:
210 210
211 211
210 210
211 211
0 211
0 211 211
0 0
210 211
210 210
211 210
210 210
210 210
0 210
0 210 210
0 0
210 0
210 0 210
210 210
210 210
210 211
0 211
0 211 211
0 0
209 0
209 0 209
209 209
210 211
210 210
210 210
0 210
0 210 210
0 0
210 211
210 210
210 0
210 0 210
211 210
0 211
0 211 211
0 0
210 213
210 210
211 210
210 210
211 211
0 210
0 210 210
188 0
188 0 188
210 0
210 0 210
210 210
210 210
210 209
209 210
0 210
0 210 210
0 0
210 0
210 0 210
210 209
210 210
210 211
0 210
0 210 210
0 0
209 211
210 210
210 210
210 210
210 211
0 210
0 210 210
0 0

First and second colums are read values, and third is just the difference between first and second, so can be ignored. There seems to be an issue that affects after X cycles and makes it return value "0".

Here is the code that i am running:

Code:
#include <NewPing.h>

NewPing sonar1(2, 3, 400); // Sensor 1: trigger pin, echo pin, maximum distance in cm


#define pingSpeed 35 // Ping frequency (in milliseconds), fastest we should ping is about 35ms per sensor, 100ms is default


void setup() {
  Serial.begin(115200);

}

void loop() {

   unsigned int current_distance1 = sonar1.convert_cm(sonar1.ping());
   delay(100);
   unsigned int current_distance2 = sonar1.convert_cm(sonar1.ping());
         Serial.print(current_distance1);
      Serial.print(" ");
      Serial.println(current_distance2);

   if (current_distance1 > current_distance2) {
    unsigned int result = (current_distance1 - current_distance2);
    if (result > 10){
      Serial.print(current_distance1);
      Serial.print(" ");
      Serial.print(current_distance2);
      Serial.print(" ");
      Serial.println(result);
 
 }
   }
   if (current_distance1 < current_distance2) {
    unsigned int result = (current_distance2 - current_distance1);
    if (result > 10){
      Serial.print(current_distance1);
      Serial.print(" ");
      Serial.print(current_distance2);
      Serial.print(" ");
      Serial.println(result);

 }
   }
   delay(29);
}

Maybe it helps you solve this issue.

Second thing, is that after a determined number of cycles, the board stops working. I mean, it just freezes. It might take something like 4 minutes or so. Im not too sure about what the reason is, but just wanted to comment it.

This code is being run on an UNO with an SRF05.

BR

39  Using Arduino / Displays / Re: Displaying JPG image on LCD/TFT captured from TTL camera on: August 15, 2012, 07:21:34 am
I had another idea. Interfacing the arduino with an Android phone to show the picture!

I would carry the arduino receiver with me, and it would send the picture via BT to my phone.

Just wanted to share it in case it would help anyone on similar projects.


BR
40  Using Arduino / Displays / Re: Displaying JPG image on LCD/TFT captured from TTL camera on: August 13, 2012, 06:28:02 am
Thanks for the tips Tom!

 I need it to work offline and with no PC near, so using ethernet wouldnt be a choice smiley-sad


Anyway, i have found a TFT display which uses SolomonĀ“s SSD1926 chipset, which is capable of handling JPEG images.

Link for it is : http://www.alibaba.com/product-gs/527324038/2_4_inch_round_tft_lcd.html

Chipset specifications: http://www.solomon-systech.com/en/product/display-system-solutions/image-processor/ssd1926/

I will see if i can find it somewhere else than alibaba.


BR
41  Using Arduino / Displays / Re: Displaying JPG image on LCD/TFT captured from TTL camera on: August 12, 2012, 08:41:32 am
Thanks for your reply Michael!

This does not quite fit for the project i am working on, but the Video Experimenter shield is perfect for another augmented reality project i am working on! Indeed, i just ordered one! Therefor, thanks for the tip!   smiley

What i want to do is the following:

I have one arduino with a distance sensor that will be the "alarm sensor", and when the distance changes (lowers), it will assume that there is an intrussion and will take a picture with the TTL cam. Once it takes the picture, it will send it over to another arduino via X-bee, which is portable. Then this other arduino, should inform that there has been an alarm, and show the picture taken.

So, i still need to know an CLCD that can display JPEG images.

BR
42  Using Arduino / Displays / Re: Displaying JPG image on LCD/TFT captured from TTL camera on: August 11, 2012, 09:55:46 pm
Thanks for the tip!

In fact, i pretend one arduino to send the data received from the camera via RF to another one, and this other one would be displaying the shot. I would really appreciate if you could let me know of a product (CLCD) that would do what you mention.

I guess that the right track would be: TTL camera-->Arduino1-->RF-->Arduino2-->SD-->CLCD


BR
43  Using Arduino / Displays / Displaying JPG image on LCD/TFT captured from TTL camera on: August 11, 2012, 10:49:08 am
Hi!

I just got this camera from sparkfun:

https://www.sparkfun.com/products/10061

The thing is, i would like to know if there is a way to actually display a single jpeg image from that camera into a colour LCD/TFT. If so, which one could i use for this task?

BR
Pages: 1 2 [3]