Check the box next to "Show verbose output during: > compilation
Click "OK"
Sketch > Verify/Compile
Wait for the compilation to fail.
Right click on the black "Output" pane at the bottom of the Arduino IDE 2.x window.
From the context menu, click "Copy All".
In a forum reply here, click on the reply field.
Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
Press "Ctrl + V". This will paste the error between the code tags.
Move the cursor outside of the code tags before you add any additional text to your reply.
If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link that will allow you to make the attachment.
gigetto1982:
error byte type.
My advice is to not pay too much attention to these red underlines. This feature can be very useful sometimes, but it's not 100% reliable. So sometimes you're going to get false results from it.
The problem is that the Servo library is not installed. Unlike the classic Arduino IDE, which comes with a collection of popular libraries (e.g., Ethernet, Servo, Stepper) pre-installed, Arduino IDE 2.x does not currently come with any libraries. So you must install any libraries your sketches use.
Also unlike the classic Arduino IDE, Arduino IDE 2.x's error message when compilation fails due to a missing library is quite cryptic. I'm hoping that will eventually be fixed to use the more helpful and standard "No such file or directory" error.
Please do this:
Sketch > Include Library > Manage Libraries... - the library manager side bar will now open.
In the "Filter your search..." field of the Library Manager side bar, type "servo".
Press the "Enter" key.
Scroll down through the many search results until you find "Servo by Michael Margolis, Arduino".
When you hover the mouse pointer over this library entry in the listing, you'll see an "Install" button appear, click on it.
A dialog will appear to indicate the library is installing. Wait for it to disappear, which means the installation is finished.
You're welcome. I'm glad to hear it's working now.
If you want all the libraries that come bundled with the classic Arduino IDE 1.8.13, you can repeat the instructions above for the following libraries:
Adafruit_Circuit_Playground
Bridge
Esplora
Ethernet
Firmata
GSM
Keyboard
LiquidCrystal
Mouse
Robot_Control
RobotIRremote
Robot_Motor
SD
SpacebrewYun
Stepper
Temboo
TFT
WiFi
Of course, some of these are for retired products or obsolete services, so you might find that you don't need them all.