Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Interfacing w/ Software on the Computer / Arduino mega adk + Processing + Android on: October 31, 2012, 03:58:01 am
I tried to use the Arduino Labs tutorial for the Accessory mode (http://labs.arduino.cc/ADK/AccessoryMode) on my Samsung Galaxy 10.1 tab with no success. The Arduino examples (e.g.: analogread) uploads alright on the Mega ADK board, but for the corresponding Processing example I get the following error message:
TEST TEST: 4
Arduino_ADK 0.1a
by D. Cuartielles, A. Goransson
at http://arduino.cc, http://1scale1.com
D:\And
Exception in thread "Thread-12" java.lang.NoSuchMethodError: cc.arduino.adk.processing.MyBuild.preprocess(Ljava/io/File;Ljava/lang/String;Lprocessing/mode/java/preproc/PdePreprocessor;)Ljava/lang/String;
   at cc.arduino.adk.processing.MyBuild.createProject(Unknown Source)
   at cc.arduino.adk.processing.MyBuild.build(Unknown Source)
   at cc.arduino.adk.processing.MyCompileThread.compileAndUpload(Unknown Source)
   at cc.arduino.adk.processing.MyCompileThread.run(Unknown Source)
Android SDK is in the D:\And folder. My OS is Windows 7.
Any help?
PS: the ADB mode works alright, though!
2  Using Arduino / Microcontrollers / Driver installation for Fio v3 on: September 17, 2012, 09:52:32 am
When I plug in the board I do not get any popup screen with Windows 7. On the device manager there is an exclamation mark in front of the corresponding v3 com port and of course on the tool menu of the IDE the port is not shown. When I try to install manually the Sparkfun driver I get an error message. The driver cannot be installed. What can I do? Please help!
3  Using Arduino / Programming Questions / Re: Fio Xbee communication on: May 22, 2012, 03:09:32 am
I modified the "lumiere" function according to your recommendations:
Code:
void lumiere()
{
  AV = analogRead(photoAV);
  GA = analogRead(photoGA);
  DR = analogRead(photoDR);
  if(AV > GA && AV > DR){
    Serial.print('H');
    digitalWrite(led10, LOW);
    digitalWrite(led12, LOW);
    moteur(0, false, 0, false, 500);
  }
  else{
    digitalWrite(led10, HIGH);
    digitalWrite(led12, LOW);
    Serial.print('L');
    while (Serial.available()) {
      // read the oldest byte in the serial buffer:
      incomingByte = Serial.read();
      // if it's a capital H (ASCII 72), turn motors in one direction:
      if (incomingByte == 'H') {
        moteuravance(255, false, 0, true);
      }
      else if (incomingByte == 'L') {
        moteuravance(0, true, 255, false);
      }
    }
  }
}
and it works.... Thanks a lot!
4  Using Arduino / Programming Questions / Re: Fio Xbee communication on: May 21, 2012, 06:25:41 am
Sorry, I thought "newest"!
So, how can I get rid of the old bytes and get only the newest. flush()? peek()?
5  Using Arduino / Programming Questions / Re: Fio Xbee communication on: May 20, 2012, 10:24:16 am
Forget the delay(100) it doesn't make any difference.
It is true that if the "if" is true for both Fio only 'H' are sent and none of the Fio's checks for serial input, so maybe when "if" becomes false then
Quote
the buffer will be filled up with H's
.
However, I thought
Code:
incomingByte = Serial.read();
was supposed to read the oldest byte, that is an 'L' if an 'L' arrives even after many 'H'.
6  Using Arduino / Programming Questions / Re: Fio Xbee communication on: May 19, 2012, 02:58:52 am
Both Fios have been uploaded with the same code.
Xbee series 1.
DH Xbee1 = SH Xbee2
DL Xbee1 = SL Xbee2
DH Xbee2 = SH Xbee1
DL Xbee2 = SL Xbee1
Few months ago you advised me on some serial communication problem to introduce somewhere
Code:
while(Serial.available == 0){
}
do you think that may alleviate my problem?
7  Using Arduino / Programming Questions / Re: Fio Xbee communication on: May 18, 2012, 09:16:54 am
Here is the complete code I use (with the proper indentation!). I tried to make it simpler....Now the real thing:
Main:
Code:
int motorPin1 = 6;
int motorPin2 = 9;
int motorPin3 = 11;
int motorPin4 = 13;
int photoAV = 3;
int photoGA = 4;
int photoDR = 2;
int AV,GA,DR;
int incomingByte,;
int led10 = 10;
int led12 = 12;

void setup() {
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
  Serial.begin(9600);
  pinMode(led10, OUTPUT);
  pinMode(led12, OUTPUT);
}
void moteur(int mot1, boolean mot2, int mot3, boolean mot4, int duree);
void moteuravance(int mot1, boolean mot2, int mot3, boolean mot4);
void lumiere();

void loop() {
  lumiere();
}
and then "lumiere" tab:
Code:
void lumiere()
{
  AV = analogRead(photoAV);
  GA = analogRead(photoGA);
  DR = analogRead(photoDR);
  if(AV > GA && AV > DR){
    Serial.print('H');
    delay(100);
    digitalWrite(led10, LOW);
    digitalWrite(led12, LOW);
    moteur(0, false, 0, false, 500);
  }
  else{
    digitalWrite(led10, HIGH);
    digitalWrite(led12, LOW);
    Serial.print('L');
    delay(100);
    if (Serial.available() > 0) {
      // read the oldest byte in the serial buffer:
      incomingByte = Serial.read();
      // if it's a capital H (ASCII 72), turn motors in one direction:
      if (incomingByte == 'H') {
        moteuravance(255, false, 0, true);
      }
      else if (incomingByte == 'L') {
        moteuravance(0, true, 255, false);
      }
      delay(100);
    }
  }
}
and "moteurs" tab:
Code:
void moteuravance(int mot1, boolean mot2, int mot3, boolean mot4)
{
  analogWrite(motorPin1, mot1);
  digitalWrite(motorPin2, mot2);
  analogWrite(motorPin3, mot3);
  digitalWrite(motorPin4, mot4);
}
void moteur(int mot1, boolean mot2, int mot3, boolean mot4, int duree)

{
  analogWrite(motorPin1, mot1);
  digitalWrite(motorPin2, mot2);
  analogWrite(motorPin3, mot3);
  digitalWrite(motorPin4, mot4);
  delay(duree);
}
Can you help me to understand why this code doesn't respond properly right a way and some delay is required for Fio1 to receive the "H" and "L" from Fio2?
8  Using Arduino / Programming Questions / Fio Xbee communication on: May 16, 2012, 04:02:35 pm
I have 2 Fio boards with Xbee series1 on top communicating (9600 baud) back an forth with "H" and "L" using the same code for both boards:
Code:
if(pin1 > pin2){
                                    Serial.print('H');
                                    delay(100);
   digitalWrite(led10, LOW);                       
            }else{
   digitalWrite(led10, HIGH);
                                    Serial.print('L');
                                    delay(100);
                        if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte == 'H') {
                   moteuravance(255, false, 0, true);
                               
    }else if (incomingByte == 'L') {
                   moteuravance(0, true, 255, false);               
}
}
}
the function
Code:
moteuravance();
is a command for two motors.
It works but not right a way. That is, when pin1 and pin2 values change there is, during 10-20 seconds, no effect and then, after a while, the motors begin to alternatively rotate in one sense and the other depending whether pin1 is larger or not than pin2.
Can somebody help me to understand what's going on? Is this something due the way the buffer is filling up?
9  Forum 2005-2010 (read only) / Troubleshooting / Re: bootloader!!!! on: December 06, 2010, 02:09:12 am
Board 1 is a Diecimila with an Atmega168 already with a bootloader (the led is blinking on reset). Board 2 is a DFRduino Duemilnove on which I set the Atmega8 with no bootloader on. Pin 11, 12 and 13 of the two boards are connected to one another. Pin 10 of board 1 is connected to the reset pin of board 2. 5v and gnd pins are wired together.
I have opened the ArduinoISP sketch from the "Examples" menu. I've selected the "Arduino NG / older Atmega8" from the "tools" menu and the last port. Then I click on "burn bootloader/with Arduino as ISP" and I get the avrdude error message.
Have I done something wrong?
Thanks for your help!
PS: I am using Windows Vista
10  Forum 2005-2010 (read only) / Troubleshooting / Re: bootloader!!!! on: December 05, 2010, 12:24:17 pm
OK, fine. I don't want to use -F. But then, how do I get my Atmega8 bootloaded?
Is this tutorial on how to use Arduino as an AVR ISP not telling everything? Should I do something special to my Windows Vista? Is it giveio or another patch which is missing?
Thanks for your help!
11  Forum 2005-2010 (read only) / Troubleshooting / bootloader!!!! on: December 05, 2010, 06:47:07 am
I am trying to burn a bootloader on an Atmega8 using two Diecemila boards following the procedure described here:
http://arduino.cc/en/Tutorial/ArduinoISP.
It doesn't work. I get the following avrdude error message:
"Expected signature for atmega8 is 1e 93 07
Double check chip, or use -F to override this check."
I would like to do that (use -F) but I do not have a clue where I should put this -F.
Is it in the ArduinoISP code I have uploaded on the Atmega168 of the first board?
Or is it somewhere in avrdude itself?
But I cannot find avrdude in the Arduino 0021 download, where is it?
In the "trouibleshooting section" it is suggested to check if the avrdude version is the correct one. I would like to do it but I cannot find avrdude!!
In the introduction of the example "ArduinoISP" it is said:
"Windows users should consider WinAVR's instead of the
avrdude included with Arduino software."
I have downloaded WinAVR and know I do know what to do with it, I do not know how to replace AVRdude with WinAVR???
I need a lot of help.
Thanks!
12  Forum 2005-2010 (read only) / Troubleshooting / Re: USB board - can't export on a high COM port nu on: March 15, 2006, 09:46:02 am
yes i have cygwin1.dll installed in the same folder as arduino. should i put in windows?
13  Forum 2005-2010 (read only) / Troubleshooting / Re: USB board - can't export on a high COM port nu on: March 12, 2006, 11:53:01 am
when i try to download a sketch i get an error message: "internal error: segmentation fault (program ccl)".
i have a usb board my os is xp.
i set the baud rate at 19200 with the tool menu and with the pc control panel.
i cannot get to the preferences mentioned in the faq because the path shown in the file menu "preferences" doesn't exist, it mentions an "application data" folder that i do not have!
anyway it is said somewhere that now with the new version of the board (mine is brand new) the bootloader is by default set at 19200.
when i press the reset button the pwr led blinks once.
the port on which i have the ftdi driver id com4 that's not too high a number i think.
so do you have any idea of what is my problem?
thanks for your help!
14  Forum 2005-2010 (read only) / Troubleshooting / Re: hard time installing 0003 on: February 05, 2006, 10:38:30 am
with this change run.bat works ok and when i hit return arduino opens. if i run arduino.exe i get this message:
"l'instruction a "0x7c94426d" emploie l'adresse memoire "0xfffffffff". La memoire ne peut pas etre "read". Cliquer sur OK..........."
My OS is windows XP.
What is an admistrative user????
I put arduino on my data drive "F":
F:\documents F\téléchargés\processing\arduino-0003.
Thanks a lot for your help.
15  Forum 2005-2010 (read only) / Troubleshooting / hard time installing 0003 on: February 03, 2006, 07:42:11 pm
i changed the java_home (i.e., where i have jre, right?)
but when i run the arduino.exe i get an error message.
maybe i should change some path in the run.bat to point arduino to the jre?
any ideas?
Pages: [1] 2 3 ... 5