here is a code snippet
commandline:
$ blink1-tool --millis 200 --rgb 255,0,255C:
blink1_device* dev = blink1_open();| /* ACE PIN Serial Tester | |
| IMPORTANT: for this to work you must uncomment "#define ACE128_ARDUINO_PINS" in ACE128.h | |
| this displays the current position in all five forms on the serial monitor | |
| pin = the raw gray-code from the pins. As you rotate this will rise and fall in steps | |
| of 1,2,4,8,16,32,64 or 128 | |
| raw = the output from the encoder map table. This should rise from 0 - 127 as you rotate clockwise | |
| if it jumps around and shows 255 a lot - your wiring does not match your encode map. Check your wiring | |
| and your object declaration. See the make_encodermap example sketch to create encoder maps for | |
| alternate pin arrangements | |
| pos = this is the raw value converted to the range -64 - +63 relative to the logical zero. Logical zero is |
here is a code snippet
commandline:
$ blink1-tool --millis 200 --rgb 255,0,255C:
blink1_device* dev = blink1_open();| % cd /Applications/Arduino-PoC.app/Contents/MacOS | |
| bok4bok:/Applications/Arduino-PoC.app/Contents/MacOS/% ls | |
| Arduino-PoC* | |
| bok4bok:/Applications/Arduino-PoC.app/Contents/MacOS/% ./Arduino-PoC | |
| root INFO Theia app listening on http://localhost:60862. | |
| daemon INFO >>> Starting 'arduino-cli' daemon... [/usr/local/bin/arduino-cli] | |
| daemon INFO [INFO] Error: unknown shorthand flag: 'v' in -v | |
| daemon INFO [INFO] Usage: | |
| daemon INFO [INFO] arduino-cli daemon [flags] | |
| daemon INFO [INFO] |
| # install pygame with "pip3 install pygame" | |
| # run with "python3 jep-big-screen.py" | |
| import pygame | |
| swidth = 640 | |
| sheight = 480 | |
| fontname = "comicsansms" | |
| message = "Hello John Park" |
| /********************************************************************* | |
| Adafruit invests time and resources providing this open source code, | |
| please support Adafruit and open-source hardware by purchasing | |
| products from Adafruit! | |
| MIT license, check LICENSE for more information | |
| Copyright (c) 2019 Ha Thach for Adafruit Industries | |
| All text above, and the splash screen below must be included in | |
| any redistribution | |
| *********************************************************************/ |
| /********************************************************************* | |
| Adafruit invests time and resources providing this open source code, | |
| please support Adafruit and open-source hardware by purchasing | |
| products from Adafruit! | |
| MIT license, check LICENSE for more information | |
| Copyright (c) 2019 Ha Thach for Adafruit Industries | |
| All text above, and the splash screen below must be included in | |
| any redistribution | |
| *********************************************************************/ |
| // | |
| // test-teensy-await.js -- demonstrate receiving data from Teensy RawHID device | |
| // using event handlers and await() | |
| // also demonstrates filtering on usagePage & usage | |
| // | |
| // For more details on RawHID, see: https://www.pjrc.com/teensy/rawhid.html | |
| // | |
| // | |
| // Tod E. Kurt / github.com/todbot | |
| // |
| // | |
| // test-teensyrawhid-await2.js -- | |
| // node-hid await test again | |
| // runnable. based on https://github.com/node-hid/node-hid/issues/358 | |
| // | |
| var hid = require('node-hid'); | |
| let sleep = (milliseconds) => { | |
| return new Promise(resolve => setTimeout(resolve, milliseconds)) |
| /** | |
| * Create extra hardware serial ports on SAMD21-based boards | |
| * Verified on ItsyBitsy M0 | |
| * from: | |
| * https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports?view=all#creating-a-new-serial | |
| * | |
| * | |
| */ | |
| #include <Arduino.h> // required before wiring_private.h | |
| #include "wiring_private.h" // pinPeripheral() function |
| /* | |
| ******************************************************************************* | |
| * USB-MIDI dump utility | |
| * Copyright (C) 2013-2017 Yuuichi Akagawa | |
| * | |
| * for use with USB Host Shield 2.0 from Circuitsathome.com | |
| * https://github.com/felis/USB_Host_Shield_2.0 | |
| * | |
| * This is sample program. Do not expect perfect behavior. | |
| ******************************************************************************* |