Originally shared by Jakob Strebel Beginner Problem:

Originally shared by Jakob Strebel

Beginner Problem: Tried to add the Bluetooth sketch for the JY-MCU.
I copied the code in the sketch window of Arduino IDE.
Compile give me the follwing error. What Iam doing wrong?
Thank you Jakob

sketch_may09a.ino:1:9: error: #include expects “FILENAME” or
sketch_may09a:3: error: ‘SoftwareSerial’ does not name a type
sketch_may09a.ino: In function ‘void setup()’:
sketch_may09a:14: error: ‘mySerial’ was not declared in this scope
sketch_may09a.ino: In function ‘void loop()’:
sketch_may09a:20: error: ‘mySerial’ was not declared in this scope
sketch_may09a:24: error: ‘mySerial’ was not declared in this scope
events/c059s4b4nbcfkknkabh42usmfqo

looks like the sketch on in the GCodePrintr FAQ is incomplete (happend when converting to html) .
The first line should be:
#include <SoftwareSerial.h>

Mathias, thank you. If I interpret the error log right I have a issue with the HW compability. I use Arduino 2560.
Any Idea how to overcome this. Jakob

c:/users/js/desktop/mul-neu/arduino-1.0.4/hardware/tools/avr/bin/…/lib/gcc/avr/4.3.2/…/…/…/…/avr/lib/avr6/crtm2560.o: In function __vector_default': (.vectors+0xdc): relocation truncated to fit: R_AVR_13_PCREL against symbol__vector_55’ defined in .text.__vector_55 section in core.a(HardwareSerial.cpp.o)

I have no idea. Make sure the right board is selected in the options (under tools)

Found the reason for this problem. Sketch compiles nicely for various Arduino Boards. But not for mine “Mega 2560”.