Problem installing Arduino on Netbeans in Ubuntu 11

I am full of a call to Arduino trying to make my first program. I have Netbeans installed and I wanted to make my first Arduino program using Netbeans. I found the following site that has step-by-step instructions. http://java.dzone.com/news/arduino-development-using

I am using NetBeans 7 for a new installation of Ubuntu 11. I am walking the site step by step.

My first hint that there is a problem is that the Assist code does not work at all.
My next problem is that when I compile the main.pde file by default, I get the following error:

fatal error: WProgram.h: No such file or directory in

cat main.pde >> applet/ArduinoTest1.cpp /usr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -DF_CPU=16000000L -DARDUINO=18 -I/home/tmonteit/arduino-0018/hardware/arduino/cores/arduino -I/home/tmonteit/arduino-0018/libraries -mmcu=atmega328p applet/ArduinoTest1.cpp -o applet/ArduinoTest1.o applet/ArduinoTest1.cpp:1:22: fatal error: WProgram.h: No such file or directory compilation terminated. make: *** [applet/ArduinoTest1.o] Error 1

When I fix similar issues on the Internet, it seems like you should make sure that you are using the right library.

For installation, I used apt-get install librxtx-java arduino-core arduino and then I downloaded arduino-1.0

How do I know if I have the correct libraries or settings?

Is there a correct way to get the correct version of these libraries and arduino that will work with NetBeans?

Is there an easy fix?

+4
source share
1 answer

Since the version used in the manual you are using (Arduino 0018), there have been several changes to the library (mainly in Arduino 1.0 and, in particular, renaming WProgram.h to Arduino.h ).

To account for these changes, the main.pde file should change to:

 #define __AVR_ATmega328P__ #include <binary.h> #include <HardwareSerial.h> #include <pins_arduino.h> #include <Arduino.h> #include <wiring_private.h> #include <EEPROM/EEPROM.h> void setup() { } void loop() { } 

In addition, pins_arduino.h moved from hardware/arduino/cores/arduino to hardware/arduino/variants/standard , so you need to add this to your include path.

+1
source

Source: https://habr.com/ru/post/1391083/


All Articles