This library enables easy access to the sensors and actuators of the Arduino NanoPlayBoard. The Arduino NanoPlayBoard is a board designed by Antonio Morales and it was designed for an introductory workshop about soldering organized by HackLab Almería. You can see the gallery of images here.
This board may be an excellent educational resource for those students who want to learn basic electronic and programming.
The sensors available on the board are a light sensor and a potentiometer.
The actuators available on the board are a 7x5 matrix LED, a RGB LED and a piezo buzzer.
For more information about the board please visit us at:
For more information about the project please visit us at:
- Open the Arduino IDE and select
Sketch > Include Library > Manage Libraries
. - Search
NanoPlayBoard
in the Library Manger. - Select the version of the library you want to install.
- Click on install and wait for the IDE to install the new library.
- Download the library.
- Open the Arduino IDE and select
Sketch > Include Library > Add .ZIP Library
. - Restart the Arduino IDE.
Once the library has been successfully installed, the example sketches will be available in the IDE.
- Select
File > Examples > NanoPlayBoard
.
#include <NanoPlayBoard.h>
NanoPlayBoard board;
...
- read
int value = board.potentiometer.read();
- scaleTo
int value = board.potentiometer.scaleTo(0, 99);
- read
int value = board.ldr.read();
- scaleTo
int value = board.ldr.scaleTo(0, 99);
- playTone
board.buzzer.playTone(440);
- stopTone
board.buzzer.stopTone();
- setColor
board.rgb.setColor(255, 0, 0);
You can use hexadecimal color strings with or without leading #
.
board.rgb.setColor("#FF0000");
board.rgb.setColor("FF0000");
- setIntensity
board.rgb.setIntensity(25);
- on
board.rgb.on();
- off
board.rgb.off();
- toggle
board.rgb.toggle();
board.ledmatrix.print("H o l a m u n d o!");
- setScrollSpeed
board.ledmatrix.setScrollSpeed(10);
board.ledmatrix.print("H o l a m u n d o!");
The library allows you to control the scroll speed that is used to display the text on the led matrix.
- printNumber
board.ledmatrix.printNumber(99);
- Arduino library for the DHT series of low cost temperature/humidity sensors.
- Software I2C Arduino library.
- NewPing Arduino library.
This library has been developed by Antonio Morales and José Juan Sánchez.
Copyright 2016 Antonio Morales and José Juan Sánchez
Licensed under the GNU General Public License, Version 3 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.gnu.org/licenses/gpl-3.0.en.html
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.