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
/* | |
Compiling and uploading to Arduino Uno (Sample Code 2) | |
====================================================== | |
avr-gcc -Os -mmcu=atmega328p -c test.c | |
avr-gcc -mmcu=atmega328p -o test.elf test.o | |
avr-objcopy -O ihex -R .eeprom test.elf test.hex | |
avrdude -F -V -c arduino -p ATMEGA328P -P /dev/cu.usbmodem1421 -b 115200 -U flash:w:test.hex | |
*/ |
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
/* | |
Compiling and uploading to Arduino Uno | |
====================================== | |
avr-gcc -Os -mmcu=atmega328p -c test.c | |
avr-gcc -mmcu=atmega328p -o test.elf test.o | |
avr-objcopy -O ihex -R .eeprom test.elf test.hex | |
avrdude -F -V -c arduino -p ATMEGA328P -P /dev/cu.usbmodem1421 -b 115200 -U flash:w:test.hex | |
*/ |
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
package com.ferdinandsilva.bluetoothtest; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothSocket; | |
import android.content.Intent; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"bufio" | |
"strings" | |
"net/textproto" | |
) |
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
/* | |
Install the library | |
------------------- | |
go get github.com/six519/gpio | |
Sample usage | |
------------ | |
Go to https://github.com/six519/gpio |
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
var cv = require('./node_modules/opencv/lib/opencv'); | |
var sleep = require('sleep'); | |
var camera = new cv.VideoCapture(0); //open camera | |
//set the video size to 512x288 | |
camera.setWidth(512); | |
camera.setHeight(288); | |
var window = new cv.NamedWindow('Camera'); | |
var firstFrame, frameDelta, gray, thresh; |
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
require 'opencv' | |
include OpenCV | |
camera = CvCapture.open #open camera | |
#set the video size to 512x288 | |
camera.width = 512 | |
camera.height = 288 | |
window = GUI::Window.new 'Camera' |
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
package com.ferdinandsilva; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.opencv.core.Core; | |
import org.opencv.core.Mat; | |
import org.opencv.core.MatOfPoint; | |
import org.opencv.core.Point; | |
import org.opencv.core.Size; |
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
/* | |
* To compile: g++ opencv_test2.cpp -o opencv_test2 $(pkg-config --cflags --libs opencv) | |
*/ | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/tracking.hpp> | |
#include <opencv2/core/ocl.hpp> | |
#include <unistd.h> | |
using namespace cv; | |
using namespace std; |
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
/* | |
* To compile: g++ opencv_test.cpp -o opencv_test $(pkg-config --cflags --libs opencv) | |
*/ | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/tracking.hpp> | |
#include <opencv2/core/ocl.hpp> | |
#include <unistd.h> | |
#define WINDOW_NAME "Camera" | |
using namespace cv; |