WProgram.h: No such file or directory with Arduino.h changed

Hello,

I'm new and still learning arduino,

I did some research on this forum based on the error in the subject and found that WProgram.h is old and needs to be replaced with Arduino.h which I did.

The version of Arduino I'm using is 1.8.9 in windows 10.

The arduino files I got it from here to test on an Arduino Mega 2560,
Link: inmoov_ros/inmoov_firmware at master · alansrobotlab/inmoov_ros · GitHub

And I double clicked on the file: [inmoov_firmware.ino] and tried to upload this sketch to the Arduino Mega,

And I got this error:

TeensyServo.h:2:22: error: WProgram.h: No such file or directory

but up the top of the TeensyServo.h, I had it like this as below:

#include <Servo.h>
#include <Arduino.h>
#include "eeprom.h"
#include "configuration.h"
#include <ros.h>

Arduino.h was originally WProgram.h and I changed that as above but when I try to upload the sketch, I still get the "WProgram.h: No such file or directory" error,

I'm not sure if I have modified this in the right place..., can you please let me know what I done incorrectly or missing?

Thank you,

Did you check inside these included files as well?

Is it a fairly old library?
I think it's in the Library folder, which is the contains the sketches folder.

Not only TeensyServo.h, but also TeensyServo.cpp has it.
Have you changed this?

Hi @chrisknightley ,

Some how after checking and changing them to Arduino.h in the include, the WProgram.h error has gone thanks,

but when I tried to upload the sketch again to the Mega, I got a different error this time as below,

exit status 1
inmoov_msgs/MotorCommand.h: No such file or directory

I checked the inmoov_ros directory in the gihub link I provided above...., I see a folder inmoov_msgs there, it exists......so Im lost...please let me know what I have done wrong here or missing?

This folder must be in the sketch folder.

Perhaps it isn't made to compile with the Arduino IDE? :roll_eyes:

EDIT:

It seems that this is still under construction.
Probably still not designed to make with the Arduino IDE.

@ozbot
Please read updated my post above.

@chrisknightley , since as you said it is still underconstruction from a while back, does that mean this will not work at all?

from your expertise, do you think from tweaking here and there would make this work, possible?

No, perhaps there is probably a works fine configuration / hardware / setup / etc...?
You should hear it in that repository.
Or find it up yourself.

Of course it is possible, but I'm sure I'm not the one to do it. :roll_eyes:

Well... Perhaps it seems that need to understand and modify the entire project rather than making such simple changes.
Maybe you probably also need knowledge of languages other than Arduino (C++). (Perhaps python?)
I'm really sorry, I can't help you any further because It seems beyond the scope of the effort I can put into one topic. :pensive:

@chrisknightley , yes because it seems when I fixed the include in the sketch:

#include <EEPROM.h>
#include <Servo.h>
#include "TeensyServo.h"
#include "configuration.h"
#include <ros.h>
#include <MotorCommand.h>
#include <MotorParameter.h>
#include <inmoov_msgs/MotorStatus.h>
#include <std_srvs/Empty.h>

I get the WProgram.h error back again when I try to upload to Mega..,

So does that mean a "python" compiler is required to be installed into Arduino IDE for it to compile this firmware properly? appreciate you!

it seems tweaking here and there, causes other problems arise..,

Hi @chrisknightley ,

are you able to give me a clue on the above question?

appreciated!

No. Arduino does not support Python.

I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. When you encounter an error, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V. This will paste the compilation output into the code block.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Click the Reply button to post the output.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.