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
| // | |
| // sample sketch for "OpenCV for Processing" library... | |
| // | |
| import gab.opencv.*; | |
| import org.opencv.core.*; | |
| import org.opencv.imgproc.*; | |
| String image_url = "http://example.com/path/to/movie.jpg"; | |
| OpenCV opencv; | |
| Mat test_img; |
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
| #pragma once | |
| #include <SDKDDKVer.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <Windows.h> | |
| #include <vector> | |
| #include <opencv2/core/core.hpp> | |
| #include <opencv2/imgproc/imgproc.hpp> |
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
| void setup() { | |
| String ipaddr = loadStrings("http://checkip.amazonaws.com")[0]; | |
| println(ipaddr); | |
| } |
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
| import java.io.*; | |
| PImage [] imgs; | |
| void setup() { | |
| size(1200, 800); | |
| File folder = new java.io.File(dataPath("")); | |
| FilenameFilter jpgFilter = new java.io.FilenameFilter() { | |
| public boolean accept(File dir, String name) { |
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
| #!/usr/bin/python | |
| # | |
| # I2CLCD control sample code (for Akizuki AQM0802A) | |
| # | |
| # setup | |
| # $ sudo apt-get install i2c-tools | |
| # $ sudo apt-get install python-smbus | |
| # | |
| # check | |
| # $ sudo i2cdetect -y 0 |
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
| #!/usr/bin/python | |
| # | |
| # GPIO control sample code for Raspberry Pi | |
| # | |
| # setup | |
| # $ sudo apt-get update | |
| # $ sudo apt-get install python-rpi.gpio | |
| # | |
| # see also... | |
| # http://elinux.org/RPi_Low-level_peripherals |
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
| #!/usr/bin/python | |
| # | |
| # MCP3204/MCP3208 sample program for Raspberry Pi | |
| # | |
| # how to setup /dev/spidev?.? | |
| # $ suod modprobe spi_bcm2708 | |
| # | |
| # how to setup spidev | |
| # $ sudo apt-get install python-dev python-pip | |
| # $ sudo pip install spidev |
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
| import processing.serial.*; | |
| Serial serial; | |
| PFont font; | |
| void setup() { | |
| size(600, 600); | |
| serial = new Serial(this, "/dev/cu.usbmodem1421", 115200); | |
| font = createFont("Impact", 32); |
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
| class Ball { | |
| int x, y, dx, dy, r; | |
| Ball() { | |
| x = (int)random(0, width); | |
| y = (int)random(0, height); | |
| dx = (int)random(-10, 10); | |
| dy = (int)random(-10, 10); | |
| r = 10; | |
| } |
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
| // | |
| // ir_remote_shutter_for_nex.ino - IR remote shutter for Sony NEX. | |
| // | |
| // this sketch is using IRremote library | |
| // https://github.com/shirriff/Arduino-IRremote | |
| // | |
| #include <IRremote.h> | |
| IRsend irsend; // please connect the IR-LED to D3. |