Slide 1

Slide 1 text

NanoPlayBoard. Un proyecto educativo Open Source Hardware XIII Jornadas SLCENT de Actualización Informática y Electrónica

Slide 2

Slide 2 text

2 NanoPlayBoard Educational Shield for Arduino Nano Made with ❤ in Almería http://nanoplayboard.org

Slide 3

Slide 3 text

Agenda 1. Projects 2. Contributing 3. Demo time 4. References 3

Slide 4

Slide 4 text

Agenda 1. Projects 2. Contributing 3. Demo time 4. References 4

Slide 5

Slide 5 text

• Arduino Library • Android App • Firmata • Johnny-Five • Python client library • Processing • ScratchX Extension 5 Projects

Slide 6

Slide 6 text

6 License GNU General Public License, Version 3 http://www.gnu.org/licenses/gpl-3.0.en.html

Slide 7

Slide 7 text

7 Arduino Library Open the Arduino IDE and select: Sketch > Include Library > Manage Libraries

Slide 8

Slide 8 text

8 Arduino Library Select: File > Examples > NanoPlayBoard

Slide 9

Slide 9 text

9 #include NanoPlayBoard board; ...

Slide 10

Slide 10 text

10 int value = board.potentiometer.read(); Potentiometer / read

Slide 11

Slide 11 text

11 int value = board.potentiometer.scaleTo(0,99); Potentiometer / scaleTo

Slide 12

Slide 12 text

12 int value = board.ldr.read(); LDR / read

Slide 13

Slide 13 text

13 int value = board.ldr.scaleTo(0,99); LDR / scaleTo

Slide 14

Slide 14 text

14 board.buzzer.playTone(440); Buzzer / playTone

Slide 15

Slide 15 text

15 board.rgb.on(); LED RGB / on

Slide 16

Slide 16 text

16 board.rgb.off(); LED RGB / off

Slide 17

Slide 17 text

17 board.rgb.setColor(255, 0, 0); LED RGB / setColor

Slide 18

Slide 18 text

18 board.rgb.setColor(“FF0000”); LED RGB / setColor

Slide 19

Slide 19 text

19 board.rgb.setIntensity(25); LED RGB / setIntensity

Slide 20

Slide 20 text

20 board.ledmatrix.print(“Hola”); LED Matrix / print

Slide 21

Slide 21 text

21 board.servos.goForward(); Servos / goForward

Slide 22

Slide 22 text

22 board.servos.goBackward(); Servos / goBackward

Slide 23

Slide 23 text

23 board.servos.goRight(); Servos / goRight

Slide 24

Slide 24 text

24 board.servos.goLeft(); Servos / goLeft

Slide 25

Slide 25 text

25 int value = board.ultrasound.pingCm(); Ultrasound / pingCm

Slide 26

Slide 26 text

26 Example

Slide 27

Slide 27 text

27

Slide 28

Slide 28 text

28

Slide 29

Slide 29 text

29 Android App

Slide 30

Slide 30 text

30

Slide 31

Slide 31 text

31 Android App

Slide 32

Slide 32 text

32 Android App

Slide 33

Slide 33 text

Example

Slide 34

Slide 34 text

34

Slide 35

Slide 35 text

35

Slide 36

Slide 36 text

36 NanoPlayBoard ❤ MQTT

Slide 37

Slide 37 text

37

Slide 38

Slide 38 text

38 Firmata • Firmata is a protocol for communicating with microcontrollers from software on a computer (or smartphone/tablet, etc). • Firmata is based on the MIDI message format. • Firmata client libraries: • Processing • Python • Perl • Ruby • Javascript https://github.com/firmata • Java • .NET • PHP • Haskell • iOS • Dart • Max/MSP • Elixir • golang • Qt/QML

Slide 39

Slide 39 text

39 Johnny-Five var five = require("johnny-five"); var board = new five.Board(); board.on("ready", function() { var led = new five.Led.RGB([9,10,11]); led.on(); led.color("#0000FF"); led.blink(1000); });

Slide 40

Slide 40 text

40

Slide 41

Slide 41 text

41 Python client library #!/usr/bin/python from nanoplayboard.nanoplayboard import NanoPlayBoard board = NanoPlayBoard() def loop(): board.rgb.on() board.sleep(1) board.rgb.off() board.sleep(1) if __name__ == "__main__": while True: loop()

Slide 42

Slide 42 text

42 Processing Work in progress

Slide 43

Slide 43 text

43 ScratchX Extension Work in progress

Slide 44

Slide 44 text

Agenda 1. Projects 2. Contributing 3. Demo time 4. References 44

Slide 45

Slide 45 text

45 Contributing We always welcome contributions to help make NanoPlayBoard better. Please feel free to post questions or comments in the HackLab Almería Forum.

Slide 46

Slide 46 text

Agenda 1. Projects 2. Contributing 3. Demo time 4. References 46

Slide 47

Slide 47 text

Agenda 1. Projects 2. Contributing 3. Demo time 4. References 47

Slide 48

Slide 48 text

48 References 1. http://nanoplayboard.org 2. http://arduino.cc 3. http://mqtt.org 4. http://johnny-five.io 5. https://processing.org 6. http://scratchx.org 7. http://firmata.org


Slide 49

Slide 49 text

NanoPlayBoard. Un proyecto educativo Open Source Hardware XIII Jornadas SLCENT de Actualización Informática y Electrónica