Skip to content

Instantly share code, notes, and snippets.

View detik19's full-sized avatar

Tedy Tri Saputro detik19

View GitHub Profile
@detik19
detik19 / teleop_turtle_joy.cpp
Last active August 29, 2015 14:12
Connect USB Joystick to Turtlesim
/*
* teleop_turtle_joy.cpp
*
* Created on: Dec 25, 2014
* Author: tedy
*/
#include <ros/ros.h>
#include <turtlesim/Velocity.h>
#include <sensor_msgs/Joy.h>
@detik19
detik19 / talker.py
Last active August 29, 2015 14:12
Simple Publisher Using Rospy
#!/usr/bin/env python
import roslib; roslib.load_manifest('beginner_tutorials')
import rospy
from std_msgs.msg import String
def talker():
pub = rospy.Publisher('chatter', String)
rospy.init_node('talker')
while not rospy.is_shutdown():
#subtitute the time to message
#!/usr/bin/env python
import roslib; roslib.load_manifest('beginner_tutorials')
import rospy
from std_msgs.msg import String
def callback(data):
rospy.loginfo(rospy.get_name()+"I heard %s", data.data)
def listener():
rospy.init_node('listener', anonymous=True)
@detik19
detik19 / 2nd_listener.py
Created December 27, 2014 14:25
How to Suscribe to turtle1/command_velocity in node turtlesim turtle_teleop_key
#!/usr/bin/env python
import roslib; roslib.load_manifest('second_tutorials')
import rospy
from turtlesim.msg import Velocity
def callback(data):
rospy.loginfo(rospy.get_name()+"I heard %f", data.linear)
def listener():
rospy.init_node('TedyGanteng', anonymous=True)
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
/*
* HelloAtmelStudio.c
*
* Created: 07/01/2015 4:11:39
* Author: tedy.saputro
*/
#include <avr/io.h>
#include <util/delay.h>
3.12.23+ #692 - 8188eu-20140626.tar.gz
3.12.24+ #693, #694 - 8188eu-20140705.tar.gz
3.12.25+ #698, #700 - 8188eu-20140705.tar.gz
3.12.25+ #701 - 8188eu-20140705.tar.gz
3.12.26+ #702, #703 - 8188eu-20140705.tar.gz
3.12.26+ #704, #707 - 8188eu-20140705.tar.gz
3.12.26+ #708 - 8188eu-20140705.tar.gz
3.12.28+ #709, #710 - 8188eu-20140908.tar.gz
3.12.28+ #712, #713 - 8188eu-20140908.tar.gz
/*****************************************************
This program was produced by the
CodeWizardAVR V2.04.4a Advanced
Automatic Program Generator
© Copyright 1998-2009 Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com
@detik19
detik19 / HelloWorld.ino
Created February 1, 2015 12:20
Hello World using ROS Serial (Publisher) for Arduino
/*
* rosserial Publisher Example
* Prints "hello world!"
*/
#include <ros.h>
#include <std_msgs/String.h>
ros::NodeHandle nh;
@detik19
detik19 / MakeSpace_LedMatrix.ino
Created January 7, 2016 22:32
Led Dot Matrix Display
//We always have to include the library
#include "LedControlMS.h"
/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.