Arduino library for short introduction training workshops run by Arduino Education. This library is originally made for TinkerKit. It simplifies the use of sensors and actuators when connected to an Arduino board. The goal is to plan and conduct a simple one or two hours of training workshop where users will still have the opportunity to model meaningful interactions using discrete electronic components. It consists of already implemented basic functions for electronic components. In order to use its functions, it only requires to import this library and then call its functions.
- In the Arduino IDE, navigate to Sketch > Include Library > Manage Libraries
- Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation.
- Then search for EduIntro using the search bar.
- Click on the text area and then select the specific version and install it.
- Navigate to the Releases page.
- Download the latest release.
- Extract the zip file
- In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library
-
EduIntro doesn’t depend on any library.
-
It is simple, basic and very easy to understand. The user only needs to import the library in his code and start using its functions.
-
Basic functions of discrete electronic components have already been implemented in this library. For a small one or two hours workshop, the user does not have to implement all the basic functions for the electronic component from scratch.
-
Basic functions of the electronic components have been implemented in this library. There's no need to re-implement these basic functions from scratch. The user simply has to import the library in the project and can use any of its functions by just calling it.
-
EduIntro has a simple and intuitive syntax to handle variables and functions.
-
EduIntro is free for everyone. Everyone can download and use it in their projects, assignments or anywhere for free.
-
- readSwitch()
- pressed()
- released()
- held()
- Note: construct a button with Button NAME(PIN) or Button NAME(PIN,PULL_UP | PULL_DOWN), by default buttons are considered to use internal pull-ups
-
- update()
- readCelsius()
- readFahrenheit()
- readHumidity()
-
-
- readX()
- readY()
- readZ()
- read()
- increasing()
- decreasing()
-
- read()
-
- isPWM()
- write()
- on()
- off()
- blink()
- state()
-
Note: construct an output with e.g. Led NAME(PIN) or Led NAME(PIN,NORMAL | INVERTED), this helps with common cathode LEDs
-
-
- begin()
- readAcceleration()
- readGyroscope()
- read()
-
- brightness()
-
- readCelsius()
- readFahrenheit()
-
- update()
- hadActivity()
- resetActivity()
- readSwitch()
- activated()
- deactivated()
- active()
-
- beep()
- noBeep()
- play()
- getMelodySize()
-
- read()
- readRange()
- readStep()
-
- write()
-
- readCelsius()
- readFahrenheit()
-
- init()
- getSSID()
- getIP()
- getStatus()
- getClient()
There are many examples implemented in this library. Below are shown some of the examples.
- Turns on an LED on for one second, then off for one second, repeatedly
#include <EduIntro.h>
Led led(D10);
void loop()
{
led.on();
delay(1000);
led.off();
delay(1000);
}
- Changes the behavior between on and off an LED when pressing a button.
#include <EduIntro.h>
Button button(D7);
Led led(D10);
void loop()
{
if (button.readSwitch() == LOW) {
led.on();
}
else {
led.off();
}
}
- Fixed an issue with the Potentiometer class in mbed (Nano 33 BLE Sense)
- Added readRange() method for the Potentiometer
- Added inverted logic for outputs and the constructor to have e.g. Led led(PIN, NORMAL | INVERTED)
- Eliminated delays in button handling
- Added second constructor for Button, choose pull_up or down
- Added library dependencies
- Added Nano Every by separating the two possible MEGAAVR boards (Nano Every + Uno WiFi rev2).
- Included a noBeep() function
- Added the new README with basic API description
The previous release included a non-functional WiFiComm file. It has been revised and made beautification in some of the code. It has been made sure that the Classic boards work fine as it got broken in the previous release.
Added support for the WiFi REV2 board and fixed the incompatibilities with servo and piezo.
All classes were separated to allow adding new classes by simply copy-pasting and modifying template examples.
General bug fixing: servo library not-two-servos fixed, added a new two-melodies example, fixed the button-pressed-by-default bug. Thanks to D. Spikol for bug catching and S. Mistry for reminding me that C++ inheritance is not always doing the things you expect.
For a course at Aalborg University, CPH, we added the humidity and temperature sensor DHT11, the LM35 temperature sensor, a PIR sensor, and a couple more examples to the courseware.
Sabas came all the way from Mexico to Malmo and made a fresh pull request. Now the library works with MKR boards!
See possible results of the workshop here
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell others about this library
- Contribute new protocols
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
The Library created and maintained by D. Cuartielles, Malmo, 2018 - 2019 WiFi REV2 compatibility by C. Rodriguez (IMU + WiFi), and D. Cuartielles (servo), Malmo, 2019 MKR compatibility by A. Sabas, Malmo, 2019
Based on previous work by:
- D. Mellis, Milano, 2006
- T. Igoe, New York, 2008 - 2010
- S. Fitzgerald, New York, 2010
- D. Gomba, Torino, 2010
- F. Vanzati, Torino, 2011
- M. Loglio, London, 2013
- G. Hadjikyriacou (DHT11 lib originator), ??
- SimKard (DHT11), 2010
- R. Tillaart (DHT11), 2011 - 2013
- A. Dalton (DHT11), 2013
- Arduino community
number: v0.0.16
codename: ananas
This library is licensed under GPLv3.