Show Posts
|
|
Pages: 1 [2] 3 4 ... 16
|
|
16
|
Using Arduino / Programming Questions / Re: How to send numbers from one Arduino to another using Serial
|
on: November 26, 2012, 06:54:29 am
|
Sorry to bump up this thread: I have used this and works pretty well. I only send 1 piece of data from one Arduino to another. First Arduino gathers data and sends it to a second Arduino that received this piece of data. What I'd like to do is to set the received data to a variable. Then re-use it in my "Loop". Code I am using in my receiving part is this, but doesn't work as expected:- const char startOfNumberDelimiter = '<'; const char endOfNumberDelimiter = '>';
long _r = 0;
void setup () { Serial.begin (115200); Serial2.begin (115200); Serial3.begin (115200); pinMode(8, INPUT); } // end of setup void processNumber (const long n) { _r = n;
} // end of processNumber void processInput () { static long receivedNumber = 0; static boolean negative = false; byte c = Serial2.read (); switch (c) { case endOfNumberDelimiter: if (negative) processNumber (- receivedNumber); else processNumber (receivedNumber);
// fall through to start a new number case startOfNumberDelimiter: receivedNumber = 0; negative = false; break; case '0' ... '9': receivedNumber *= 10; receivedNumber += c - '0'; break; case '-': negative = true; break; } // end of switch } // end of processInput void loop () { if (Serial2.available ()) { processInput (); } Serial.println(_r); }
Any help is appreciated.
|
|
|
|
|
18
|
Using Arduino / Project Guidance / Masking parts of an LCD with software
|
on: October 12, 2012, 02:44:39 pm
|
|
Hi everyone.
I have a 7" LCD which has a VGA and a RCA input.
It's going to go to in my car eventually. The RCA input will be connected to a reverse camera. I need to make something up to go between the RCA input and the reverse camera to mask (in black) parts of this input. So when you get a square picture of whatever's behind your car, I need some of it to be masked in black.
Is there a device or way of doing this at all?
Thanks.
|
|
|
|
|
19
|
Using Arduino / General Electronics / Re: Frequency Measurement Library Noise
|
on: October 10, 2012, 06:18:34 am
|
|
Thanks again.
Another question while we're at it.
When connected to my car's speed signal, it measures the frequency spot on, however when var is stationary (zero speed) either it measures random values or nothing.
Is there a way of measuring zero frequency?
|
|
|
|
|
24
|
Using Arduino / Project Guidance / Re: Expand flash memory on Arduino
|
on: September 27, 2012, 01:14:49 pm
|
|
Sorry about the mistake. That's what I thought, we might still be too slow.
We need the Arduino to measure various sensor values and sent to display.
Cannot be Android tablet as we may wanna output to different size LCDs from 7" to lets say 10".
Pi or similar would be good, but has to have a solid operating system so not to crash all the time. Also if this path is going to be taken, we need it to start up pretty fast (reason why we went with a micro-controller to start with). In addition, we don't want the users to see any start up text or GUI or anything. You turn the device on and bang it starts. Start up time can be 5-7 seconds though.
What you reckon?
|
|
|
|
|
26
|
Using Arduino / Project Guidance / Re: Expand flash memory on Arduino
|
on: September 27, 2012, 11:20:49 am
|
Yes I'm dumping graphics from the uSD.
When I wanna show an image and I call it, it gets drawn fro the top to the bottom and takes probably ~1 second for it to draw, need a faster time than that.
You have 300,000 pixels and write at 3840 bytes per second. I'm surprised you get it done in 1 seconds. I was expecting 10 seconds. You must be writing jpeg at large loss rate, but still the display itself is too slow than anything raw at more than 1 frame a second due to its serial connection. You want something fast, you need 8-16 or 32 bit wide bus at high speed. Do you think it's the Arduino that's slow and not the actual 4DS module? Not that the images are stored on the uSD car on the module.
|
|
|
|
|
28
|
Using Arduino / Project Guidance / Re: Expand flash memory on Arduino
|
on: September 27, 2012, 09:34:48 am
|
|
Imagine it was 4DS that was slow. Is it advisable to go with a system by connecting Arduino to a Raspberry pie like platform? Have Arduino handle the control sides of things and send data to the pie to show as graphics? Is it even possible?
Thanks.
|
|
|
|
|
30
|
Using Arduino / Project Guidance / Re: Expand flash memory on Arduino
|
on: September 27, 2012, 08:37:54 am
|
This meant each image took 15 lines of code. So imagine if I had 100 images that'd be 1500 lines of code! I don't understand this but if you've fixed it then good. As for the speed, do you know where the bottleneck is, you could add an ARM50 and find that it's the serial connection or even the 4DS processor. Have you done the maths, now many bytes have to be transferred to redraw a screen? What baud rate are you using? _____ Rob Not sure how many bytes. The screen is 640 x 480 pixels. I am on 38400 bps baudrate. I have contacted the person who wrote the library also to see if he has tested with ChipKit or not and what the results are. Thanks.
|
|
|
|
|