This file contains 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 <DigiUSB.h> | |
void setup() | |
{ | |
pinMode(2, INPUT); // P2 = anolog input 1 | |
pinMode(1, OUTPUT); | |
DigiUSB.begin(); | |
} | |
void loop() |
This file contains 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 <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 1 | |
#define NUMPIXELS 1 | |
Adafruit_NeoPixel RGBLed = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); |
This file contains 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 <Servo.h> | |
#include <ros.h> | |
#include <sensor_msgs/LaserScan.h> | |
const int TRIG_PIN = 10; | |
const int ECHO_PIN = 11; | |
unsigned long duration; | |
unsigned int distance; |
This file contains 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/env python | |
import rospy | |
from sensor_msgs.msg import LaserScan | |
rospy.init_node('laser_scan_publisher') | |
scan_pub = rospy.Publisher('scan', LaserScan, queue_size=50) | |
num_readings = 100 |
This file contains 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/env python | |
import math | |
from math import sin, cos, pi | |
import rospy | |
import tf | |
from nav_msgs.msg import Odometry | |
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3 |
This file contains 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/env python | |
import rospy | |
from geometry_msgs.msg import Twist | |
def callback(message): | |
rospy.loginfo("message: (%2.2f %2.2f)", message.linear.x, message.angular.z) | |
def listener(): | |
rospy.init_node('twist_example') |
This file contains 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 time | |
import math | |
import bluepy | |
from bluepy.bluepy import sensortag | |
MAGNETIC_DECLINATION = 7.0 # Tokyo | |
print "=== init" | |
tag = sensortag.SensorTag('XX:XX:XX:XX:XX:XX') |
This file contains 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 bluepy | |
from bluepy.bluepy import sensortag | |
import math | |
def main(): | |
import time | |
import sys | |
import argparse | |
parser = argparse.ArgumentParser() |
This file contains 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 gcv_test | |
import ( | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
This file contains 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 dlib | |
import cv2 | |
detector = dlib.simple_object_detector("detector.svm") | |
cap = cv2.VideoCapture(0) | |
while(True): | |
# Capture frame-by-frame | |
ret, frame = cap.read() |