I have 2 working sketches that I want to combine but get was not declared in this scope errors
I know its the curly brackets but the sketch is too long and im lost inside it
any pointers?
Arduino: 1.8.10 (Mac OS X), Board: "Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), Serial, 72Mhz (Normal), Smallest (default)"
/Users/lee/Documents/Arduino/touch_pedal_graph_white/touch_pedal_graph_white.ino: In function 'void setup()':
touch_pedal_graph_white:160:15: error: 'analogMeter' was not declared in this scope
analogMeter(); // Draw analogue meter
^
/Users/lee/Documents/Arduino/touch_pedal_graph_white/touch_pedal_graph_white.ino: In function 'void loop()':
touch_pedal_graph_white:216:26: error: 'plotNeedle' was not declared in this scope
plotNeedle(reading, 0); // Update analogue meter, 8ms delay per needle increment
^
/Users/lee/Documents/Arduino/touch_pedal_graph_white/touch_pedal_graph_white.ino: At global scope:
touch_pedal_graph_white:221:1: error: expected unqualified-id before '{' token
{
^
/Users/lee/Documents/Arduino/touch_pedal_graph_white/touch_pedal_graph_white.ino: In function 'void DrawBarChartP1(Adafruit_ILI9341&, double, double, double, double, double, double, double, double, int, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, String, boolean&)':
touch_pedal_graph_white:276:1: error: a function-definition is not allowed here before '{' token
{
^
touch_pedal_graph_white:851:1: error: expected '}' at end of input
}
^
touch_pedal_graph_white:851:1: error: expected '}' at end of input
touch_pedal_graph_white:851:1: error: expected '}' at end of input
Multiple libraries were found for "Adafruit_ILI9341.h"
Used: /Users/lee/Documents/Arduino/libraries/Adafruit_ILI9341
Not used: /Users/lee/Library/Arduino15/packages/stm32duino/hardware/STM32F1/2019.6.29/libraries/Adafruit_ILI9341
Multiple libraries were found for "SPI.h"
Used: /Users/lee/Library/Arduino15/packages/stm32duino/hardware/STM32F1/2019.6.29/libraries/SPI
Multiple libraries were found for "XPT2046_Touchscreen.h"
Used: /Users/lee/Documents/Arduino/libraries/XPT2046_Touchscreen
Multiple libraries were found for "Adafruit_GFX.h"
Used: /Users/lee/Documents/Arduino/libraries/Adafruit_GFX_Library
exit status 1
'analogMeter' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
touch_graph_white.ino (28.2 KB)