I met the same problem and based on the previous answers I wrote this script for Arduino IDE. I'm using it successfully on different OSs for many months to now. In the repository, you can find the instructions to install it.
The SmartInventor library is to be used with the Rokit Smart board. That board is based around the ATMega32.
The Arduino Mega is not a Rokit Smart board, so the library will not work, since the Arduino Mega us based around the ATMega2560. The two chips are different, and have different sets of internal peripherals. So the registers have different names ...
You misunderstand Serial.read(): it does not return a String or sth. like a char array, but an integer, representing only the last byte in the input buffer that hasn't been read.
What you probably want to do is to interpret those incoming bytes as chars and accumulate those in a String.
E.g. like this:
// as long ...
this isn't an arduino specific error what you're trying to do is declare and initialize the variable in one statement which is causing the problem. As you've figured it out already. Declaring the variable first
and initializing it another statement does the job for you
Hope this helps. PS, try posting the error that you get during ...
For PIC32 you need chipKIT. Not all chips are supported, but most of the PIC32MX and PIC32MZ chips are. Which exact PIC32 chip(s) do you have?
You will need to install a bootloader, for which you will need a programmer. It is possible to build a programmer using an Arduino, though TBH I'd just pick up a cheap PICkit2 clone from China.
As for the 8-bit ...
You code shows multiple errors:
At the start you are commenting the SmartInventor library out. You need this library. You should delete the comment markers /* and */ around the #include statement.
At the end of the code you have < SmartInventor.h / >. You should delete this line. It is simply wrong, not even C/C++ syntax.
You seem to misunderstand, ...
I have a post about this problem.
Basically you cannot attach a class function with attachInterrupt because of the hidden "this" pointer which needs to be supplied to a (non-static) class function, where "this" is the particular instance of the class. You can work around it like this:
static volatile bool switchChanged; // declare
Assuming you have an RFID scanner that you can interface with the Arduino, sure.
The Arduino is a modest 8-bit processor running at 8 or 16 mHz, with pretty limited memory. You program it in C/C++.
What you describe is dirt-simple, and well within the abilities of an Arduino, so yes.