This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define GPIO0 0x44e07000 // GPIO0 Controller | |
| #define GPIO1 0x4804c000 // GPIO1 Controller | |
| #define GPIO2 0x481ac000 // GPIO2 Controller | |
| #define GPIO3 0x481ae000 // GPIO3 Controller | |
| #define GPIO_SET_OUT 0x194 // Set 1s to OUT | |
| #define GPIO_SET_CLEAR 0x190 // Set 1s to CLEAR | |
| #define GPIO_DATAOUT 0x13c // SET ALL bits to state specified | |
| #define GPIO_DATAIN 0x138 // Read state of all pins? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Toggle GPIO pins / make a LED blink via manipulating BBB registers. Why? Because you need really fast I/O toggling and don't want to use the PRU. | |
| Step 1: Make sure selected pin is set to output. If not create a device tree overlay, include pins you need. | |
| What's the device tree? http://xillybus.com/tutorials/device-tree-zynq-1 | |
| And a device tree overlay .... | |
| http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* blink lights on ATTiny with AVR-C */ | |
| #define F_CPU 1000000UL | |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #define LED4 PB4 | |
| #define LED3 PB3 | |
| #define LED2 PB2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * GIFfy | |
| * Make an animated gif from your quicktime .mov screen capture | |
| * Public Domain | |
| */ | |
| import processing.video.*; | |
| import gifAnimation.*; | |
| Movie mov; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Work with the Samsys 2.8 RFID reader over serial, strip out dupe output | |
| # Adapted from a threaded serial "chat" snippet | |
| # http://stackoverflow.com/questions/10465952/python-chat-program-for-serial-port-connection-rs-232 | |
| # | |
| # Default port and baudrate are /dev/serial/by-id/usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USA-19H-if00-port0 and 57600 | |
| # | |
| # Refer to CHUMP command reference for commands, include ! at end of your command | |
| # http://www.sirit.com/Tech_Support_Downloads/CHUMP_Prot_Ref_Gd_v7.0[1].pdf | |
| # in the future you can enable script to generate proper cmd checksum | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Arduino connectivity test</title> | |
| <!-- Bootstrap --> | |
| <!-- Latest compiled and minified CSS --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "FastLED.h" | |
| // number of strips | |
| #define NUM_STRIPS 3 | |
| // number of lights per strip, if equal | |
| #define NUM_LEDS 2 | |
| struct CRGB leds1[NUM_LEDS]; | |
| struct CRGB leds2[NUM_LEDS]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Experimenting with web sockets to control LEDs over a serial connection. | |
| index.html - Client | |
| server.js - Server | |
| SerCmdLED.ino - arduino code, we can treat this like a black box, here is the interface: | |
| set all to: | |
| RED | |
| GREEN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // THIS SKETCH WORKS! | |
| #include <OctoWS2811.h> | |
| #define BTSERIAL Serial2 | |
| #define DEBUG true | |
| #define NUM_BYTES (17*3) | |
| int i=0; | |
| byte inBytes[NUM_BYTES]; | |
| boolean stringComplete = false; | |
| uint32_t hexcolor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Tic Tac Toe</title> | |
| <link href='http://fonts.googleapis.com/css?family=Orbitron:400,700' rel='stylesheet' type='text/css'> | |
| <style> | |
| body { background:#000; color:#00ff00; margin: 0px; padding: 0px; font-family: "Orbitron","Helvetica","Arial","Sans-serif";} | |
| h1 { font-weight: 700; font-size: 3em; } | |
| button { font-family: "Orbitron","Helvetica","Arial","Sans-serif"; background:#000; color:#00FF00; border:1px solid #00FF00; padding:7px;} |
NewerOlder