I'm trying out the programming on touch feeling lamp project from the Arduino starter kit.
I'm currently stuck in the installation of the CapacitiveSensor library.
How to install the library on the online editor?
the Arduino website mention only the following.
Unzip, and add to Arduino/hardware/libraries/
To add capacitiveSensor to a new sketch choose Sketch->Import Library->CapacitiveSensor
But for the online editor we are unable to access the Arduino/hardware/libraries/
can someone be kind enough to guide me step by step?
non programmer here.
Thanks in advances
- Download CapacitiveSensor04.zip
- In Arduino Web Editor, click the "Libraries" tab on the left side of the screen
- Click the button with the up arrow (Import) to the right of the "Library Manager" button
- If you get a dialog about importing your sketchbook click "Import"
- Select the downloaded file
- Click "Open"
You can use the same technique to install most Arduino libraries that you find available for download online.
I’ve done the steps, but it seems not loaded into the spetch.
Take for example, I add a <Servo.h>, when I declare myServo, the myServo becomes orange.
But when I tried to add the <CapacitiveSensor.h>, when I declare capSensor, the capSensor is not orange but white.
The color really doesn’t mean anything. Library authors can add a file named keywords.txt to their library with a list of the library’s keywords. The Arduino IDE colors all the keywords that are found in every installed library. Some people think the Arduino IDE’s crude keywords system is so stupid that it’s not worth adding a keywords.txt, some people are just too lazy to add one, some people write a keywords.txt but get the formatting wrong so it doesn’t work, some people don’t even know about the keywords feature. You will find some libraries with all keywords colored. You will find some that forgot to update their keywords.txt so only some of the keywords are colored. You will find some libraries with no keywords colored. What really matters is does the code compile and does the code work. The color of the code is irrelevant.