28

The backslash in your comments are the problem. As per C++ language definitions, a \ at the end of the line is interpreted as a "line continuation". Thus, your comment gets continued in the next line and your variable declaration and initialization is commented out. This is apparent when opening your code with a good syntax highlighting program, like ...


7

0302 is 0xc2. Somewhere in your source you have one or more non-breaking spaces (0xa0) encoded in UTF-8 (0xc2 0xa0). Use od or a similar tool to find them, and then replace them with normal spaces. Since you have non-ASCII Latin-1 characters in your source, those characters are encoded as two bytes with the first being 0xc2 or 0xc3. Remove all non-ASCII ...


7

In C you can not use quotation marks inside quotation marks (thus nested). Replace message2 += " <meta name="viewport" content="width=device-width, initial-scale=1">"; to message2 += " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"; By using the escape character \ it means that \" is a character (") instead of ...


5

It appears you're using an outdated version of the OneWire library that does not support ESP8266. Please follow these instructions to upgrade to the latest release of the library: Sketch > Include library > Manage libraries... Wait for the download to finish. In the "Filter your search..." box, type "onewire". Click on the "OneWire" entry. Click the "Update"...


5

The remove method was added to the String class in 1.0.6. Installing Arduino IDE from the Ubuntu repository gets you a really old package (1.0.5). You should download and install the newest version from the official Arduino page.


5

You need to declare your function before you use it. So either the whole function body needs to be before the usage, or you must add a function prototype declaration. void myfunction(); myfunction(); void myfunction(){ return 0; }


5

Using #include <Arduino.h> in your myheader.h will also include <stdint.h> and probably solve this. The Arduino IDE automatically includes Arduino.h in the sketch itself, but apparently not for external stuff.


5

This is a bug in the Arduino IDE: when converting your .ino file to a .cpp file, it added a declaration for the function ledFactory() before the declaration of the type led_t. As it appears to be adding those declarations right before the first function of your sketch, a simple workaround is to put all your type definitions before your functions.


5

First, we must make sure the "-fno-exceptions" compiler flag is overwritten with "-fexceptions". In addition, we must link a separate library that includes the compiler support functions for stack unwinding. Navigate to C:\Users\<UserName>\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12 and create a new file platform....


4

You mix capitals with non capital characters. The case of characters in variable names are important, so ledPin2 is a different variable than ledpin2. Also, never mix similar names (unless it is trivial). Either always use ledpinx or ledPinx, not sometimes the first and sometimes the second version. camelCasing is normally used for local variables, means ...


4

Did you forget to include the ArduinoJSON header file: #include <ArduinoJson.h>


4

You spelled the header filename wrong: #include "SegDispaly.h" should be: #include "SegDisplay.h" You have also made the same mistake in the class name multiple places in SegDisplay.cpp.


4

#include <LiquidCrystal .h> You put a space before ".h" which means the file won't be found. Remove the space. And don't post questions in all capitals.


4

One cause of the /(302) error is copy and paste code from a word processor. You have ASCII codes copied that add spaces, etc to your code. Go through each identified line and remove any extra spaces at the beginning and end of any identified line. Then, (Arduino IDE) go to TOOLS, Auto Format. At least, this cleared up the problem for me.


4

if (rightStickVerticalPwm == 0) { servo1.write(elevatorServoStop); } else if (rightStickVerticalPwm > 1500) { servo1.write(100); } else (rightStickVerticalPwm < 1400) { servo1.write(30); } You cannot have another comparison in an else statement. You might have meant else if in the last clause. Clarification if you're not ...


3

You can't use Client directly like that. It's just an abstract class. You have to use one of the classes like EthernetClient or WiFiClient that implements it. Client is like a shell of a class. It says that there will be classes that act as clients and will have this basic form. But it doesn't have any code, just the outline. The base classes that ...


3

uint8_t first = atoi (tmp1.substring(1, 3).c_str ()); Or even: String data = "#255101987"; uint8_t first = atoi (data.substring(1, 3).c_str ());


3

Processing code is intended to be run on a computer. You would use the Processing IDE to run this code. The Arduino IDE is used to write, compile, and upload code to a microcontroller that you might have on an Arduino board. This is the cause of the error.


3

In this class declaration: class Test { public : Test(); ~Test(); Map<int, String> *list = new Map<int, String>(); }; This line is wrong: Map<int, String> *list = new Map<int, String>(); You can't execute procedural code when declaring a class. That has to go into the constructor or some other function. For ...


3

You seem to have been programming in Java recently, because many of your errors have a Java ‘whiff’ to them. This, as you’ve tagged, is C++, not Java. sendMouseState: a. You wrote leftPressed == true. This is much more simply expressed by the expression leftPressed. b. You wrote middlePressed == false. This is much more simply expressed using the “not” ...


3

You don't want an array of strings containing the (badly formatted) names of variables. Instead you want an array of 32-bit integers containing the values held within those variables. const uint32_t colors[] = { CRGB::White, CRGB::WhiteSmoke, CRGB::CadetBlue, CRGB::SteelBlue, CRGB::Teal, CRGB::SlateGray, CRGB::MediumPurple, ...


3

This is a known fault with the compiler in Windows. The annoying thing is that it's the version of the compiler that is included in the Windows Store App version of the Arduino IDE. It also snuck into the Windows version of the IDE from version 1.8.6 from the Arduino.cc website, with the bundled version of the Arduino AVR core. There are numerous Github ...


3

Rule #1: Header file extension is ".h". Files with ".cpp" are ususally compiled as separate compilation units into the object file. If you have any function definition (= declaration + implementation) or any global variable in more object files, it'll fail to link. Rule #2: No definitions in headers - variables and functions will cause this error if you ...


3

I needed to install the boards package for: Arduino AVR Boards Under Tools -> Board -> Board Manager


3

The DEBUG_ functions in the DGS class are private and used only in DGS.cpp. They will not collide with the macros from DHT.h If DHT.h is included before DGS.h, the preprocessor replaces the DEBUG_ function names with the content of the macros from DHT.h and the result doesn't make sense for the compiler. You could do #undef DEBUG_PRINT and #undef ...


3

In Lib.h you should declare an extern int myVariable; In Lib.cpp you can define it once #include "Lib.h" int myVariable=123; ...


3

The AVR-based Arduinos don't come with anything close to a full C++ standard library implementation. They have avr-libc which is fairly complete to at least the C99 standard, that is the C standard from 1999, not C++. What you're doing with -std=c++11 is influencing the standard used by the compiler to interpret the C++ language itself. This does work ...


2

So I seem to have fixed it. One way or another, I think VisualMicro suffered some type of problem with the installed boards. My first clue was that my sketches still compiled int the native Arduino IDE. So I went into the VisualMicro explorer and noticed that there was an update to 1.6.19 in the board manager (I was running 1.6.13). I don't know exactly what ...


2

There are a few suggestions here, here and here: Ensure you are using the latest Arduino software that is compatible with Visual Micro (this is not necessarily the latest Arduino software!) Go to Visual Micro menu -> Board pulldown -> Find or install a board--> Rescan. You should get "Toolchain reload complete". The Visual Micro forum ...


Only top voted, non community-wiki answers of a minimum length are eligible