Go Down

Topic: Arduino verify problem ''no such file or directory'' (Read 246 times) previous topic - next topic

Sporerodas

Hi!
I wrote a code to a bluetooth controlled robot.
But when I verified my arduino code it says ''No such file or directory'',A few days ago there was no problem with the programming.
Here is the code if something is wrong with the programming.



#include <Servo.h>
#include <SoftwareSerial.h>
#include <AFMotor.h>
int incomingbyte = 0;  //incoming serial data


AF_DCMotor motor1(1, MOTOR12_64KHZ); //motor1 is connected to M1 port
AF_DCMotor motor2(2, MOTOR12_64KHZ); //motor2 is connected to M2 port

Servo head;
void setup() {
  Serial.begin(9600); //Serial communication at 9600 bps
  head.attach(9); //servo to pin D9 or to servo2 on motor shield
  motor1.setSpeed(255); //set default speed
  motor2.setSpeed(255); //set default speed
  pinMode(13, OUTPUT); //the blue LED
}

void loop() {
  if (Serial.available() > 0) { //if the Arduino detects incoming data
    // read the incoming byte:
    incomingbyte = Serial.read();
  }
  switch (incomingbyte) //set different cases of the "incomingbyte" variable
  {
    case 'S': {
        motor1.run(RELEASE); // stopped
        motor2.run(RELEASE); // stopped
        incomingbyte = '*';
      } break;

    case 'F': { //go forward
        motor2.run(FORWARD);
        motor1.run(FORWARD);
        motor2.setSpeed(255);
        motor1.setSpeed(255);
      } break;

    case 'B': { //go backward
        motor2.run(BACKWARD);
        motor1.run(BACKWARD);
        motor2.setSpeed(255);
        motor1.setSpeed(255);
      } break;

    case 'R': { //spin right
        motor1.run(RELEASE);
        motor2.run(FORWARD);
        motor2.setSpeed(255);
      } break;

    case 'L': { //spin left
        motor1.run(FORWARD);
        motor2.run(RELEASE);
        motor1.setSpeed(255);
      } break;

    case 'G': { //forward left
        motor1.run(FORWARD);
        motor2.run(FORWARD);
        motor2.setSpeed(190);
        motor1.setSpeed(255);

    case 'I': { //forward right
        motor1.run(FORWARD);
        motor2.run(FORWARD);
        motor1.setSpeed(190);
        motor2.setSpeed(255);
      } break;

    case 'H': { //backward left
        motor1.run(BACKWARD);
        motor2.run(BACKWARD);
        motor2.setSpeed(190);
        motor1.setSpeed(255);
      } break;

    case 'J': { //backward right
        motor1.run(BACKWARD);
        motor2.run(FORWARD);
        motor1.setSpeed(190);
        motor2.setSpeed(255);
      } break;

    case 'W': {
        digitalWrite(13, HIGH); //lights on
      } break;

    case 'w': {
        digitalWrite(13, LOW); //lights off
      } break;

    case 'U': {
        motor1.setSpeed(128); //set lower speed
        motor2.setSpeed(128);
      } break;

    case 'u': {
        motor1.setSpeed(255); //set max speed
        motor2.setSpeed(255);
    } break;
  }
  }
}


Please help me!!!

SMM2

What line(s) are highlighted in red when you try to verify your code?
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

PaulS

Quote
Arduino verify problem ''no such file or directory''
So why haven't you downloaded the required library?

MarkT

You would normally post the full output from the compiler when reporting errors, there is
likely useful information in it.   
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Sporerodas

Thanks to everyone who wants to help me with this problem.

In my other arduino codes that does not work, it is a red line where the error is. But in this code it isn't a red line on the code.

If I go to sketch -> include library -> manage libraries and search on servo, softwareserial and adafruit motor shield library, it says that I already installed the libraries.

This is the full error message: avr-gcc: error: No such file or directory
Error compiling

SMM2

Hi @Sporerodas, have you used these libraries before? Especially the Adafruit Motor Shield library, since that is not a standard library? You may have placed that library in the wrong place. Usually it is supposed to be placed in Documents -> Arduino folder -> libraries folder (That is so for Windows users). That may be your problem, because I have also had that problem before.

Hope that helps :)
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

pert

This is the full error message: avr-gcc: error: No such file or directory
Error compiling
There should be more to that error message. After compiling fails the bar between the editor and console windows should turn orange and there should be a button "Copy error messages" on the right side of that bar. Please click on that button and then paste it here using code tags(</> button on the toolbar).

Southpark

#7
Jul 22, 2016, 09:24 am Last Edit: Jul 22, 2016, 09:32 am by Southpark
You sure that was the full message?

Sporerodas

Hi!
I have used AF motor shield library for about two weeks now, and at the first attemptes it all went just fine.
If I go to Documents -> Arduino -> libraries folder I can see a folder called adafruit-Adafruit-Motor-Shield-library-fb5b17c.

Here is the full error message:
Arduino:1.6.5 (Windows 7), Kort:"Arduino/Genuino Uno"

avr-gcc: error: No such file or directory
Error compiling

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Sporerodas

#9
Jul 28, 2016, 05:55 pm Last Edit: Jul 28, 2016, 06:20 pm by Sporerodas
Hi again!

I have updated my arduino software to 1.6.10. When I verified my code, I can see that it isn't an error anymore. But when I upload my code to my arduino I get this error:




Arduino:1.6.10 (Windows 7), Board:"Arduino/Genuino Uno"

Sketch uses 4 082 bytes (12%) of program storage space. Maximum is 32 256 bytes.
Global variables use 303 bytes (14%) of dynamic memory, leaving 1 745 bytes for local variables. Maximum is 2 048 bytes.
java.io.IOException: Cannot run program "___REMOVE___/bin/avrdude": CreateProcess error=2, File not found
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
   at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
   at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:130)
   at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:209)
   at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
   at processing.app.Sketch.upload(Sketch.java:1187)
   at processing.app.Sketch.exportApplet(Sketch.java:1160)
   at processing.app.Sketch.exportApplet(Sketch.java:1132)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2409)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=2, File not found
   at java.lang.ProcessImpl.create(Native Method)
   at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
   at java.lang.ProcessImpl.start(ProcessImpl.java:137)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
   ... 9 more
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

pert

Do:
  • Tools > Board > Boards Manager
  • Wait for all the downloads to complete
  • Click the "Close" button
  • Now try again


That fixes the issue for me, I haven't figured out what the cause is yet.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy