gharaei
December 28, 2017, 7:47pm
1
hi .
when i try to upload codes to my arduino i have below error but strange problem about it is that
#include <WProgram.h> that error mentions does not exist in my code at all ! and i could find no zip file of that in order to install it .
error :
Arduino: 1.8.3 (Windows 8.1), Board: "Arduino/Genuino Uno"
Build options changed, rebuilding all
In file included from C:\Users\Gharaei.m\Documents\Arduino__.ino:2:0:
C:\Users\Gharaei.m\Documents\Arduino\libraries\SoftwareServo/SoftwareServo.h:4:22: fatal error: WProgram.h: No such file or directory
#include <WProgram.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
system
December 28, 2017, 7:53pm
2
You have some very old code, which you haven't shown us.
Try Arduino.h instead.
• Ensure the Arduino IDE is closed
• Locate SoftwareServo.h
• Open SoftwareServo.h in your favorite text editor
• Line #4 should look like this...
#ifndef SoftwareServo_h
#define SoftwareServo_h
#include <WProgram.h>
#include <inttypes.h>
class SoftwareServo
{
private:
uint8_t pin;
uint8_t angle; // in degrees
uint16_t pulse0; // pulse width in TCNT0 counts
uint8_t min16; // minimum pulse, 16uS units (default is 34)
uint8_t max16; // maximum pulse, 16uS units, 0-4ms range (default is 150)
• Change line #4 to this...
#include <Arduino.h>
• Save SoftwareServo.h
• Close the text editor
• Try again to build your sketch
• Report the problem here...
gharaei
December 29, 2017, 9:57am
5
problem solved , thank you so much