Skip to content

Latest commit

 

History

History
182 lines (136 loc) · 4.73 KB

README.md

File metadata and controls

182 lines (136 loc) · 4.73 KB

Library for the Arduino NanoPlayBoard Build Status

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:

PCB

Upperside

upperside

Underside

underside

Installation

Using the Library Manager

  • 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.

library_manager

Importing a .zip Library

  • Download the library.
  • Open the Arduino IDE and select Sketch > Include Library > Add .ZIP Library.
  • Restart the Arduino IDE.

Examples

Once the library has been successfully installed, the example sketches will be available in the IDE.

  • Select File > Examples > NanoPlayBoard.

examples

Quick start

Include the library and declare a NanoPlayBoard object.

#include <NanoPlayBoard.h>

NanoPlayBoard board;

...

Potentiometer

  • read
int value = board.potentiometer.read();
  • scaleTo
int value = board.potentiometer.scaleTo(0, 99);

LDR

  • read
int value = board.ldr.read();
  • scaleTo
int value = board.ldr.scaleTo(0, 99);

Buzzer

  • playTone
board.buzzer.playTone(440);
  • stopTone
board.buzzer.stopTone();

LED RGB

  • 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();

LED Matrix

  • print
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);

Libraries used in this project

Credits

This library has been developed by Antonio Morales and José Juan Sánchez.

License

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.