http://wiki.processing.org/w/Android
and obviously
http://openkinect.org/wiki/Main_Page
Saturday, June 25, 2011
Wednesday, June 8, 2011
Pair IT
So I had read an interesting article (http://pragprog.com/magazines/2011-06/pair-programming-in-a-flash) over the weekend about pair programming. I have done a bit of pair work with Ron, but not terribly much. It seems like a potentially great idea, especially if you can mix junior and senior level guys together, there is a great deal of learning that can happen, and it is a great way to mentor.
The interesting thing however that I thought of today is that most of my pair work is not while coding but with deploying servers. Over the last few months I have been more involved in helping set up webapp servers in conjunction with our IT department. The observation I had is that we are essentially doing paired IT, in much the same way that the pragmatic guys are saying to do paired programming. My observation is that paired IT for deploying webapps is a very good way to do things. Things move very quickly using this technique, and there is very little down time working with new services that have to be deployed. I think one of the keys here is also the combination of people involved. IT is obviously IT, with little programming experience, but a wealth of background in managing servers and networks. Then I am a programmer with a decent background in server technology. That combination I think leads to an effective pairing, where the task can be approached by two people with differing views. The other advantage I notice is that when things go wrong it is in many cases a much shorter troubleshooting period, since having a developer right there means that looking at stack traces is more fruitful in many cases than it is with only IT personnel looking at it, or having to send it to a developer. Obviously this still happens since I am often not the developer for the project being deployed, however I think having that combination of skills is a great way to pair in IT.
So, here are some guidelines I think might be useful:
- Deploy new services/webapps in a pair
- One member of the pair should be from IT and the other from webops or development
- experiment with ideas singly, not in pairs
So, I think this is just as good of an idea as pair programming, and can really make deployments fairly painless and quick.
The interesting thing however that I thought of today is that most of my pair work is not while coding but with deploying servers. Over the last few months I have been more involved in helping set up webapp servers in conjunction with our IT department. The observation I had is that we are essentially doing paired IT, in much the same way that the pragmatic guys are saying to do paired programming. My observation is that paired IT for deploying webapps is a very good way to do things. Things move very quickly using this technique, and there is very little down time working with new services that have to be deployed. I think one of the keys here is also the combination of people involved. IT is obviously IT, with little programming experience, but a wealth of background in managing servers and networks. Then I am a programmer with a decent background in server technology. That combination I think leads to an effective pairing, where the task can be approached by two people with differing views. The other advantage I notice is that when things go wrong it is in many cases a much shorter troubleshooting period, since having a developer right there means that looking at stack traces is more fruitful in many cases than it is with only IT personnel looking at it, or having to send it to a developer. Obviously this still happens since I am often not the developer for the project being deployed, however I think having that combination of skills is a great way to pair in IT.
So, here are some guidelines I think might be useful:
- Deploy new services/webapps in a pair
- One member of the pair should be from IT and the other from webops or development
- experiment with ideas singly, not in pairs
So, I think this is just as good of an idea as pair programming, and can really make deployments fairly painless and quick.
Sunday, May 15, 2011
ADK compiled for android 3.1
I got the ADK compiled for android 3.1. The way it is written is targeted at 3.0 with an additional library. The general instructions and ADK can be found here http://developer.android.com/guide/topics/usb/adk.html
First, remove line 10 ( ) from the androidManifest.xml file. Now we must change DemoKitActivity.java.
The imports for USB must be changed from com.android.future.usb.... to android.hardware.usb....
In line 128 and 139 change:
UsbAccessory accessory = UsbManager.getAccessory(intent);
to:
UsbAccessory accessory =(UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
Line 152 must go from:
mUsbManager = UsbManager.getInstance(this);
to:
mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
Now I just have to wait for my USB host board to come in so that I can play with some stuff....
First, remove line 10 (
The imports for USB must be changed from com.android.future.usb.... to android.hardware.usb....
In line 128 and 139 change:
UsbAccessory accessory = UsbManager.getAccessory(intent);
to:
UsbAccessory accessory =(UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
Line 152 must go from:
mUsbManager = UsbManager.getInstance(this);
to:
mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
Now I just have to wait for my USB host board to come in so that I can play with some stuff....
Saturday, May 14, 2011
lots of stuff
Well, been a long time since I updated. Well, have some new tech toys, particularly a tegra 2 powered tablet. Which just got an os update today, which should include host mode USB. That will be great. I also ordered a usb host shield for the arduino. I am really looking forward to playing with some physical devices hooked up to the android device. I now just have to learn to program for android......
Also have all of the functional construction done on my Mountain Models EVA. Hopefully if the weather is nice next weekend I will get a chance to hit the field. We shall see.
Also am moving to a new place with tons more room on June 1st. I am really hoping to have some dedicated workbench/lab space setup for doing embedded systems type stuff with arduino and android devices. We will see how it all works out, but there should def. be more room for working on projects which ia always a huge plus.
Also have all of the functional construction done on my Mountain Models EVA. Hopefully if the weather is nice next weekend I will get a chance to hit the field. We shall see.
Also am moving to a new place with tons more room on June 1st. I am really hoping to have some dedicated workbench/lab space setup for doing embedded systems type stuff with arduino and android devices. We will see how it all works out, but there should def. be more room for working on projects which ia always a huge plus.
Wednesday, April 13, 2011
Antlr
So I have started playing a little bit with Antlr, specifically using antlrworks. I was originally going to learn MPS, however Antlr seems like a possibly better choice. It seems that it can generate python as well as java parsers. Obviously I am most interested in the python ones.
http://www.dalkescientific.com/writings/diary/archive/2007/10/30/antlr_mw.html
This seems to be a good article that I am starting to work through.
http://www.antlr.org/wiki/display/ANTLR3/ANTLR+Cheat+Sheet
Some notes:
need the python library from http://antlr.org/download/Python/
- requires 3.1.3 version of antlr, will not work with the newest version of antlrworks
name of file must match the grammar name
the language can be specified like(defaults to java):
options{
language=python;
}
http://www.dalkescientific.com/writings/diary/archive/2007/10/30/antlr_mw.html
This seems to be a good article that I am starting to work through.
http://www.antlr.org/wiki/display/ANTLR3/ANTLR+Cheat+Sheet
Some notes:
need the python library from http://antlr.org/download/Python/
- requires 3.1.3 version of antlr, will not work with the newest version of antlrworks
name of file must match the grammar name
the language can be specified like(defaults to java):
options{
language=python;
}
Wednesday, March 9, 2011
Well, havent posted anything in a while. I have been too busy with school and work and all of that normal stuff. But I did pick up a 8-bit AVR based game console/dev kit. I am hoping in a few weeks to dive into that. I also want to use the n-gon code I wrote to help implement astroids on the arduino. I think that would be fairly cool, and will learn a great many things. Just have to get through some school stuff first.
Monday, January 3, 2011
n-gon
So this weekend I wanted to use the ST7565 display with the arduino to draw a rotating cube, but decided to start in 2D first. So I did a rotating n-gon, which just showed how distracted and out of practice I am with C. None the less, it works, for the most part. Here is the source, pictures to follow later.
point.h:
typedef struct{
int x;
int y;
} Point;
arduino sketch:
#include
#include
#include "point.h"
#define BACKLIGHT 10
#define n 4
//n as in n-gon
ST7565 glcd(9, 8, 7, 6, 5);
static Point p[n];
static Point center;
float theta=30;
//due to error the smallest usable theta appears to be
//10 degrees, 15 is even better. anything lower and the steps are uneven due to
//rounding.
float c_t; //cos of theta
float s_t; //sin theta
boolean persist = true;
float distance;
void setup(){
Serial.begin(9600);
pinMode(BACKLIGHT, OUTPUT);
digitalWrite(BACKLIGHT, HIGH);
p[0]= (Point) {40, 10};
p[1]= (Point) {80, 10};
p[2]= (Point) {80, 50};
p[3]= (Point) {40, 50};
center= (Point) {60, 30};
glcd.st7565_init();
glcd.st7565_command(CMD_DISPLAY_ON);
glcd.st7565_command(CMD_SET_ALLPTS_NORMAL);
glcd.st7565_set_brightness(0x18);
theta = theta*(3.1415/180);
s_t=sin(theta);
c_t=cos(theta);
glcd.clear();
}
void loop(){
distance = sqrt(pow(p[1].x-p[0].x, 2)+pow(p[1].y-p[0].y, 2));
Serial.println(distance);
if(persist==false){
glcd.clear();
}
for(int i=0; i glcd.drawline(p[i].x, p[i].y,
p[i+1].x, p[i+1].y, BLACK);
}
glcd.drawline(p[n-1].x, p[n-1].y,
round(p[0].x), p[0].y, BLACK);
glcd.display();
for(int i=0; i p[i]=rotate_point(p[i], true);
}
delay(500);
}
Point rotate_point(Point _p, boolean clockwise){
//c_t is cos(theta) as a global to reduce computation
//s_t is sin(theat) as a global to reduce computation
//center is a Point, which represents the local origin the point
// will rotate around
float x = _p.x-center.x;
float y = _p.y-center.y;
if(clockwise==true){
_p.x = round((c_t*x)-(s_t*y)+center.x);
_p.y = round((s_t*x)+(c_t*y)+center.y);
}else{
_p.x = round((c_t*x)+(s_t*y)+center.x);
_p.y = round((c_t*y)-(s_t*x)+center.y);
}
return _p;
}
point.h:
typedef struct{
int x;
int y;
} Point;
arduino sketch:
#include
#include
#include "point.h"
#define BACKLIGHT 10
#define n 4
//n as in n-gon
ST7565 glcd(9, 8, 7, 6, 5);
static Point p[n];
static Point center;
float theta=30;
//due to error the smallest usable theta appears to be
//10 degrees, 15 is even better. anything lower and the steps are uneven due to
//rounding.
float c_t; //cos of theta
float s_t; //sin theta
boolean persist = true;
float distance;
void setup(){
Serial.begin(9600);
pinMode(BACKLIGHT, OUTPUT);
digitalWrite(BACKLIGHT, HIGH);
p[0]= (Point) {40, 10};
p[1]= (Point) {80, 10};
p[2]= (Point) {80, 50};
p[3]= (Point) {40, 50};
center= (Point) {60, 30};
glcd.st7565_init();
glcd.st7565_command(CMD_DISPLAY_ON);
glcd.st7565_command(CMD_SET_ALLPTS_NORMAL);
glcd.st7565_set_brightness(0x18);
theta = theta*(3.1415/180);
s_t=sin(theta);
c_t=cos(theta);
glcd.clear();
}
void loop(){
distance = sqrt(pow(p[1].x-p[0].x, 2)+pow(p[1].y-p[0].y, 2));
Serial.println(distance);
if(persist==false){
glcd.clear();
}
for(int i=0; i
p[i+1].x, p[i+1].y, BLACK);
}
glcd.drawline(p[n-1].x, p[n-1].y,
round(p[0].x), p[0].y, BLACK);
glcd.display();
for(int i=0; i
}
delay(500);
}
Point rotate_point(Point _p, boolean clockwise){
//c_t is cos(theta) as a global to reduce computation
//s_t is sin(theat) as a global to reduce computation
//center is a Point, which represents the local origin the point
// will rotate around
float x = _p.x-center.x;
float y = _p.y-center.y;
if(clockwise==true){
_p.x = round((c_t*x)-(s_t*y)+center.x);
_p.y = round((s_t*x)+(c_t*y)+center.y);
}else{
_p.x = round((c_t*x)+(s_t*y)+center.x);
_p.y = round((c_t*y)-(s_t*x)+center.y);
}
return _p;
}
Subscribe to:
Posts (Atom)