Hi Everyone,
I hope this finds everyone well.
Ive been trying to create this tutorial project...
http://playground.arduino.cc/Learning/Tutorial01
I have followed each of the steps and uploaded the wiring code successfully.
I have then created the a second code file for the processing code as shown in the lower sections of the guide.
The issue I have is that when I compile the code, it returns multiple error messages:-
Bluetooth_Control_Code:2: error: 'import' does not name a type
Bluetooth_Control_Code:5: error: 'Serial' does not name a type
Bluetooth_Control_Code:9: error: 'color' does not name a type
Bluetooth_Control_Code:10: error: 'RectButton' does not name a type
Bluetooth_Control_Code.ino: In function 'void setup()':
Bluetooth_Control_Code:14: error: 'size' was not declared in this scope
Bluetooth_Control_Code:15: error: 'color' was not declared in this scope
Bluetooth_Control_Code:15: error: expected ;' before 'baseColor' Bluetooth_Control_Code:16: error: 'currentcolor' was not declared in this scope Bluetooth_Control_Code:16: error: 'baseColor' was not declared in this scope Bluetooth_Control_Code:23: error: 'class HardwareSerial' has no member named 'list' Bluetooth_Control_Code:23: error: 'println' was not declared in this scope Bluetooth_Control_Code:29: error: 'port' was not declared in this scope Bluetooth_Control_Code:29: error: expected type-specifier before 'Serial' Bluetooth_Control_Code:29: error: expected
;' before 'Serial'
Bluetooth_Control_Code:36: error: expected ;' before 'buttoncolor' Bluetooth_Control_Code:37: error: expected
;' before 'highlight'
Bluetooth_Control_Code:38: error: 'rect1' was not declared in this scope
Bluetooth_Control_Code:38: error: expected type-specifier before 'RectButton'
Bluetooth_Control_Code:38: error: expected ;' before 'RectButton' Bluetooth_Control_Code:45: error: 'buttoncolor' was not declared in this scope Bluetooth_Control_Code:46: error: 'highlight' was not declared in this scope Bluetooth_Control_Code:47: error: 'rect2' was not declared in this scope Bluetooth_Control_Code:47: error: expected type-specifier before 'RectButton' Bluetooth_Control_Code:47: error: expected
;' before 'RectButton'
Bluetooth_Control_Code.ino: In function 'void draw()':
Bluetooth_Control_Code:54: error: 'currentcolor' was not declared in this scope
Bluetooth_Control_Code:54: error: 'background' was not declared in this scope
Bluetooth_Control_Code:55: error: 'stroke' was not declared in this scope
Bluetooth_Control_Code:56: error: 'mouseX' was not declared in this scope
Bluetooth_Control_Code:56: error: 'mouseY' was not declared in this scope
Bluetooth_Control_Code:57: error: 'rect1' was not declared in this scope
Bluetooth_Control_Code:58: error: 'rect2' was not declared in this scope
Bluetooth_Control_Code.ino: In function 'void update(int, int)':
Bluetooth_Control_Code:68: error: 'rect1' was not declared in this scope
Bluetooth_Control_Code:69: error: 'rect2' was not declared in this scope
Bluetooth_Control_Code:77: error: 'mousePressed' was not declared in this scope
Bluetooth_Control_Code:78: error: 'rect1' was not declared in this scope
Bluetooth_Control_Code:79: error: 'currentcolor' was not declared in this scope
Bluetooth_Control_Code:80: error: 'port' was not declared in this scope
Bluetooth_Control_Code:81: error: 'rect2' was not declared in this scope
Bluetooth_Control_Code:82: error: 'currentcolor' was not declared in this scope
Bluetooth_Control_Code:83: error: 'port' was not declared in this scope
Bluetooth_Control_Code.ino: At global scope:
Bluetooth_Control_Code:94: error: 'color' does not name a type
Bluetooth_Control_Code:95: error: 'color' does not name a type
Bluetooth_Control_Code:96: error: ISO C++ forbids initialization of member 'over'
Bluetooth_Control_Code:96: error: making 'over' static
Bluetooth_Control_Code:96: error: ISO C++ forbids in-class initialization of non-const static member 'over'
Bluetooth_Control_Code:97: error: ISO C++ forbids initialization of member 'pressed'
Bluetooth_Control_Code:97: error: making 'pressed' static
Bluetooth_Control_Code:97: error: ISO C++ forbids in-class initialization of non-const static member 'pressed'
Bluetooth_Control_Code:119: error: declaration of 'boolean Button::pressed()'
Bluetooth_Control_Code:97: error: conflicts with previous declaration 'boolean Button::pressed'
Bluetooth_Control_Code:125: error: declaration of 'boolean Button::over()'
Bluetooth_Control_Code:96: error: conflicts with previous declaration 'boolean Button::over'
Bluetooth_Control_Code.ino: In member function 'void Button::update()':
Bluetooth_Control_Code:103: error: 'currentcolor' was not declared in this scope
Bluetooth_Control_Code:103: error: 'highlightcolor' was not declared in this scope
Bluetooth_Control_Code:105: error: 'currentcolor' was not declared in this scope
Bluetooth_Control_Code:105: error: 'basecolor' was not declared in this scope
Bluetooth_Control_Code.ino: In member function 'boolean Button::pressed()':
Bluetooth_Control_Code:112: error: could not convert '((Button*)this)->Button::over' to 'bool'
Bluetooth_Control_Code.ino: At global scope:
Bluetooth_Control_Code:138: error: expected initializer before 'Button'
Please could someone point me in the right direction? Am I supposed to add the second section of the code to the first?
Any help would be hugely appreciated and I apologise for asking dumb questions!
Thanks
Alex