Loading...
  Show Posts
Pages: 1 ... 21 22 [23] 24 25 ... 107
331  Using Arduino / Programming Questions / Re: PS/2 +Servo on: April 01, 2013, 08:03:50 am
So as of right now, without the servos connected, the code works or it doesn't work? It code be something in the libraries that are conflicting with each other. Post your .h and .cpp files for the PS2 mouse.
332  Using Arduino / Displays / Re: lcd created random caracters on: April 01, 2013, 07:10:17 am
Where is your code? Post it in FULL
333  Using Arduino / Programming Questions / Re: VirtualWire.h Conundrum - won't compile on: March 30, 2013, 09:40:10 pm
Ok so that just leaves the location of the file. It needs to be in the "sketches" folder -> libraries. If there is no libraries folder, make one and drop the file in there. Also make sure it is not double foldered.
334  Using Arduino / Programming Questions / Re: VirtualWire.h Conundrum - won't compile on: March 30, 2013, 08:49:58 pm
Why did you switch out hardware.h?
335  Using Arduino / Programming Questions / Re: VirtualWire.h Conundrum - won't compile on: March 30, 2013, 08:24:02 pm
Look at the .h file, and see if it contains WProgram.h. If it does, change it to Arduino.h. Also where is the library, what folder is it in?
336  Using Arduino / Programming Questions / Re: Strings, Char, and Arrays on: March 30, 2013, 11:47:59 am
Your incoming string is going to be individual chars, not a full string. So like I said before, save the incoming chars into a char array and then split it up.
As for the M117, you can use substrings, but will it work when you enter the string via serial monitor?

Note: it may need a terminating character.
337  Using Arduino / Programming Questions / Re: Strings, Char, and Arrays on: March 30, 2013, 10:29:37 am
strtok() works like this.

your string "123,456:789."
strtok will look in the string and actually look for ", : ." If strtok sees any of those characters, it will return to the first address it started from, and out put the data up to that split char. Now yours, being that it starts with a char and then the number follows, it will not work correctly. This is unless you maybe have a dummy variable, and then on the next variable you store the correct data. But it would just be easier to just send the numbers first and then the splitting char.

So from M117 to 117M
338  Using Arduino / Programming Questions / Re: Weird problems with Wire.h on: March 29, 2013, 05:22:36 pm
Perhaps all those Stop() functions.
339  Using Arduino / Programming Questions / Re: Strings, Char, and Arrays on: March 29, 2013, 05:21:12 pm
So why not just use strtok()? It will do everything practically for you. The only thing that it won't do, is look at individual incoming chars, it needs to be a complete string. So what you can do is, store everything first, then split the data.
340  Using Arduino / Programming Questions / Re: Strings, Char, and Arrays on: March 29, 2013, 02:45:18 pm
Question, what are you trying to do?

From what I can tell by looking at InStr(), its looking for a particular char within the string, and how many times it occurs.
Yours, I dont know.
341  Using Arduino / Programming Questions / Re: Connect RF Link Transmitter / Receiver - 434MHz and MP3 Shield on an UNO on: March 29, 2013, 02:37:45 pm
Where is the code that shows you tried to combine the MP3 player and the receiver code?
342  Using Arduino / Programming Questions / Re: "was not declared in this scope" and I don't get why on: March 29, 2013, 01:36:03 pm
Is your button on the digital 1 or analog A1? You have Serial.begin(9600); in your code and if you have anything on 0 or 1 (digital pin) you may have problems.
343  Using Arduino / Programming Questions / Re: Connect RF Link Transmitter / Receiver - 434MHz and MP3 Shield on an UNO on: March 29, 2013, 01:09:02 pm
Code?
344  Using Arduino / Programming Questions / Re: Weird problems with Wire.h on: March 29, 2013, 11:52:01 am
Please fix this
Quote
if (accelerationX >  500) control = B00000001; //tilt back
  if (accelerationX < -500) control = B00000010; //tilt forward
  if (accelerationY >  500) control = B00000011; //tilt right
  if (accelerationY < -500) control = B00000100; //tilt lfet
  if (accelerationX <  500) {
  if (accelerationY <  500) {
  if (accelerationX > -500) {
  if (accelerationY > -500) control = B00000000;}}} //back to blank state

For your last "control = B00000000" just use an ELSE statement.


Next, why does stop() need to be in every movement? Also all those delays are going to make your code very sluggish. Look into the "Blink Without Delay" example, it will help you greatly.
345  Using Arduino / Project Guidance / Re: Recording Peak Value on: March 28, 2013, 09:08:29 am
When does previousValue get updated? I would think the previousValue is the old peak value, so you can just substitute previousValue with peakValue, and it should work.
Pages: 1 ... 21 22 [23] 24 25 ... 107