John Tokash

My Comcast “High Speed” Internet is Dying

April 18, 2009 · 1 Comment

UPDATE: Fixed! Comcast replaced the cable modem this morning.

AFTER:
fast

BEFORE:
slow

→ 1 CommentCategories: Web

Python + OS X + Arduino + BlinkM

March 23, 2009 · Leave a Comment

I have a bunch of BlinkMs and an Arduino from an old project and I spent some time with them this weekend. This time, I used Python on a Mac to connect. I learned a little in the process, so I thought I’d share.

1. I used darwinports‘ Python2.4 and the pyserial library.
2. On the Arduino, I flashed the BlinkMCommunicator code available here.
3. When writing to the BlinkM’s eeprom, you need to pause briefly before sending another command.
4. The attached code uses decode(”hex”). I’ll explain that design choice later.
5. The code assumes you have 3 BlinkM’s hooked up to the Arduino with their addresses set as 1, 2 and 3.

import serial
import time

def toBlinkM (ser, command):
	print ">\t Sending "+command
	ser.write(command.decode("hex"))
	print ">\t\t Sent "+command

def setBlinkMToPlaySimpleScript (ser, address, color1, color2, color3, color4, duration, fadespeed):
	# example: write line 0 of script 0 on BlinkM 1
	# 	01	Start code
	#	01	BlinkM address
	#	08	bytes to send
	#	00	bytes to receive
	#	57	command: write line
	#	00	script number
	#	00	line number
	#	20	duration
	#	63	fade
	#	20	R
	#	20	G
	#	00	B

	print ("> Playing Simple Script on "+address)

	toBlinkM(ser, "01"+address+"0800570000"+duration+"63"+color1)
	time.sleep (.2)
	toBlinkM(ser, "01"+address+"0800570001"+duration+"63"+color2)
	time.sleep (.2)
	toBlinkM(ser, "01"+address+"0800570002"+duration+"63"+color3)
	time.sleep (.2)
	toBlinkM(ser, "01"+address+"0800570003"+duration+"63"+color4)
	time.sleep (.2)
	# last line: play script 0 1 time
	toBlinkM(ser, "01"+address+"0800570004"+"00"+"70"+"000100")
	time.sleep (.2)

	# set script id 0 to a len. of 5, 1 repeats
	toBlinkM(ser, "01"+address+"04004C000501")
	time.sleep (.2)

	# set fade speed
	toBlinkM(ser, "01"+address+"020066"+fadespeed)
	time.sleep (.2)

	# play script id 0
	toBlinkM(ser, "01"+address+"040070008000")
	time.sleep (.2)

ser = serial.Serial('/dev/tty.usbserial-A4001lcU',19200, timeout=1)

counter = 0

print "> Waiting for Arduino."

while 1:
	serialline = ser.readline()
	if (serialline):
		print serialline.strip()
	if ('ready' in serialline):
		break

print "> Arduino ready."

# tell #1 to stop animating
toBlinkM(ser, "010101006f")

# tell #1 to show only green and red at 1 bright
toBlinkM(ser, "0101040063010100")

# tell #2 to stop animating
toBlinkM(ser, "010201006f")

# tell #2 to show only blue and green at 1 bright
toBlinkM(ser, "0102040063000101")

# tell #3 to stop animating
toBlinkM(ser, "010301006f")

# tell #3 to show only red at 3 bright
toBlinkM(ser, "0103040063030000")

time.sleep (10)

setBlinkMToPlaySimpleScript(ser,"01","404040","FF0000","0000FF","FF0000","05","10")
setBlinkMToPlaySimpleScript(ser,"02","400000","FF0000","800000","FF0000","05","10")
setBlinkMToPlaySimpleScript(ser,"03","000000","FF0000","000000","FF0000","20","10")

→ Leave a CommentCategories: Coding · Gadgets · Make

I Love Ambient Information

March 23, 2009 · Leave a Comment

iPulse (12.95):
iPulse

iStat Menus (Free):
iStat Menus

iStock (Free with MacHeist 3):
iStock

Firefox: Cognitive Shield (Free):
Firefox: Cognitive Shield

Stattoo (12.95):
Stattoo

→ Leave a CommentCategories: Science · Visualization

Touch Book Impressions

March 2, 2009 · Leave a Comment

The Touch Book looks very cool. I’ve been waiting for a netbook with a detachable keyboard and here it is! It even has 2 internal usb ports! Still: I’m not sure if it’s right for me. I would prefer a faster CPU, even if it meant lower battery life.

If that magnet mount is strong enough for mounting to a metal plate on my dashboard, though…

→ Leave a CommentCategories: Gadgets · Mobile

A Happy Accident

February 28, 2009 · Leave a Comment

While working on a new Ajax Indicator, my code accidentally generated this. Pretty cool!
ajaxindicator

→ Leave a CommentCategories: Coding · Visualization

er… Unscheduled Maintenance

February 28, 2009 · Leave a Comment

Hooray! www.tokash.org, readermini.com, aggcompare.com, etc are all back up.

→ Leave a CommentCategories: AggCompare · Blogging · ReaderMini

Big Pictures

February 15, 2009 · 1 Comment

It’s no secret that I love The Boston Globe’s Big Picture blog. So I’m glad to see that Joshua Weinberg and Andrea Mignolo have teamed up to put out a WordPress theme that gives photographers a similar way to present their creations. Joshua’s family photos are being uploaded now to his site, using the theme.

Nice Job!!!

The theme is called Zack 990 and it’s available NOW. It’s called 990 because the images are 990 pixels wide!!!

zack990

→ 1 CommentCategories: Uncategorized

Palm Pre SDK Debut

February 15, 2009 · Leave a Comment

O’Reilly and Palm just announced (and released) Chapter 1 of a Palm Pre / Mojo SDK book.

Here are my thoughts as I read through the chapter.

  • Much of what we’ve seen the native apps do in various videos is possible for 3rd party apps. Notifications, running in the background, etc.
  • 3rd Party apps have access to a bunch of services to add value to the built in functionality.
  • The Prototype AJAX library is bundled with WebOS.
  • Developers can make headless palm pre apps that interact with the dashboard and notifications but have no card.
  • When an app is deleted by the user, so is any info it put into contacts or calendar.
  • webOS System Architecture Diagram (attached below)
  • “Video and audio capture is not supported in the initial webOS
    products, but is inherently supported by the architecture. “
  • “The Palm Developer Tools (PDT) are installed from the SDK and include targets for
    Linux, Windows (XP/Vista) and Mac OS X.”
  • The document mentions a fluid physics engine!
  • The document also says 3rd parties can build apps which take up multiple cards (1 for each activity) similar to what we’ve seen the mail app do with composition windows.
  • There is a hyper optimized list widget included in the SDK. We’ve seen how useful that can be in the iPhone SDK, so it’s good to see that Palm is investing there as well.
  • “A service is an on-device server for any resource, data, or configuration that is exposed through the framework for use within an application. The service can be performed by the native OS (in the case of device services), an application, or by a server in the cloud. The model is very powerful as evidenced by the initial set of offered services. The Services differ from the rest of the framework because they are called through a single controller function, serviceRequest. The request passes a JSON object specific to the called service and specifying callbacks for success and failure of the service re- quest. “

webos

→ Leave a CommentCategories: Uncategorized

TMobile G1

January 25, 2009 · Leave a Comment

With all of this talk about the iPhone and the Palm Pre I often wonder how the G1 and future Android phones will stack up. I’ve had limited interactions with the G1, but I’ve read lots of conflicting reviews. It’s nice to see a review from someone with the kind of holistic understanding of mobile phones that Jonathan Greene has.

Read Jonathan’s review over at atmaspheric endeavors. Pay close attention to his positive comments about the browser and his negative comments about the battery.

→ Leave a CommentCategories: Uncategorized

Palm Pre FAQ

January 23, 2009 · 5 Comments

Gizmodo has an up-to-date Palm Pre FAQ.

Meanwhile:
PreCentral.net has rapid fire coverage specific to the device.
PrePoint is adding historical context, comparing the new OS to ACCESS and pointing to some of the things we DON’T know about the Pre.
Pre Community is discussing both the business and technical aspects of the Pre.
PalmPreView dug up more hints from the past about the Pre.
I expect that the official Palm Developer Blog will ramp up coverage quickly, too.

palmpre

→ 5 CommentsCategories: Gadgets · Mobile · Palm · Web