If you keep getting cpan errors trying to install Net::Bluetooth or LEGO::NXT...
You need to first install Device::SerialPort first.
Save you many headaches.
Wednesday, December 23, 2009
A note to perl enthusiasts trying to get Lego::NXT installed on their machines
Saturday, July 4, 2009
Alpha-Rex, Ruby-nxt fail, out takes of my robot with a microkorg voice
***EDIT Appparently I built him wrong as at LEAST 200 hundred people have let me know END EDIT July 12th 2009***
Alpha Rex is a horrible design, but only partially my fault. He was designed by lego and is the flagship robot for the nxt design series. I had to improvise a lot of the building because I just didn't have the parts. And yeah I may have lost a lego or two, but not that many honestly for the amount of improvisation involved. On top of that I could tell just by the design that his "legs" were just a hack. He doesn't really walk, in fact much more similar to spike, he "land swims". With the program I wrote for him I pretty much just wanted to get him to walk by alternating the motors. Oh woah is me. Just watch the video to see what ensuses. So just wanting a robot platform to put intelligence into I sit and I wait and I hope, eyes gazing towards the Nao robots.
Sunday, June 7, 2009
Motion Detecting Lego NXT mindstorm arm written in ruby
The building instructions for this arm can be found here:
http://www.nxtprograms.com/robot_arm/steps.html
I added the Ultra sensor to it, and you will notice some of the funtions in the code aren't used at all, because I plan on doing more with this.
If you liked this you might also like
My NXT tagged posts.
My Arduino tagged posts.
or
How to make a contact MIC.
require "rubygems"
require "serialport"
require "nxt_comm"
$DEBUG = false
@nxt = NXTComm.new('/dev/tty.NXT-DevB-1')
def sleeper
sleep(0.5)
end
@nxt = NXTComm.new("/dev/tty.NXT-DevB-1")
def do_motor_a
a = Commands::Motor.new(@nxt)
a.port = :a
a.duration = {:rotations => 0.25}
a.control_power = true
a.start
puts "Run State: #{a.run_state}"
end
def do_motor_b
b = Commands::Motor.new(@nxt)
b.port = :b
b.duration = {:rotations => 0.25}
b.control_power = true
b.start
end
def do_motor_c
c = Commands::Motor.new(@nxt)
c.port = :c
c.duration = {:rotations => 0.25}
c.control_power = true
c.start
puts "Run State: #{c.run_state}"
end
def do_motorb_a
a = Commands::Motor.new(@nxt)
a.port = :a
a.duration = {:rotations => 0.25}
a.control_power = true
a.direction = :backward
a.start
puts "Run State: #{a.run_state}"
end
def do_motorb_b
b = Commands::Motor.new(@nxt)
b.port = :b
b.direction = :backward
b.duration = {:rotations => 0.25}
b.control_power = true
b.start
end
def do_motorb_c
c = Commands::Motor.new(@nxt)
c.port = :c
c.direction = :backward
c.duration = {:rotations => 0.25}
c.control_power = true
c.start
puts "Run State: #{c.run_state}"
end
def inputs_2
s = @nxt.get_input_values(NXTComm::SENSOR_2)
puts s[:value_raw]
if s[:value_raw] > 1005
@nxt.play_tone(659,500)
do_motorb_a
do_motorb_b
sleep 1
do_motor_a
do_motor_b
sleep 1
end
end
def inputs_1
sm = @nxt.get_input_values(NXTComm::SENSOR_1)
puts sm.inspect
sleep 1
end
loop {
inputs_2
}
Saturday, April 25, 2009
Hacker Crib...that's right, books and stuff, computers, arduino, nxt brick...I am not a nerd, I am a hacker....in my grandma's basement...damnit
I was trying to make an explanation video of why some of my shit doesn't get done as fast as I predict on the blog....And yeah this video doesn't really show that or anything....le sigh.
Friday, February 6, 2009
The Weekend, WOOT! Lego Mindstorm perl bot thing
Yes I am aware of how the comments in the code make no sense on the lego nxt mindstorm post. I am going to clean all of that up this weekend as well as addressing shortcomings in the code and adding some more features. I will probably have a video of the robot doing it's thing this weekend as well as, a new song on goblin majick. So rock on guys.