[16:20] zeusbot joined #highaltitude.
[16:46] icez (n=icez@ip68-3-56-121.ph.ph.cox.net) joined #highaltitude.
[17:00] defy (n=defy@60-234-234-98.bitstream.orcon.net.nz) left irc: Read error: 110 (Connection timed out)
[17:04] <phatmonkey> hi jcoxon
[17:04] <jcoxon> hey phatmonkey
[17:05] <phatmonkey> i've started to think about hooking it up to my car
[17:05] <phatmonkey> and software
[17:05] <phatmonkey> i suggest you write a simple library in C for controlling the servos
[17:06] <phatmonkey> in the same format as mine for the robostix
[17:06] <phatmonkey> then we can mix and match code
[17:06] <jcoxon> hehe i'm just trying to work out how to actually control the servos
[17:06] <phatmonkey> yeah
[17:06] <jcoxon> i've grabbed the pwm module
[17:06] <jcoxon> and manged to compile and insert it
[17:06] <jcoxon> but
[17:06] <jcoxon> now i don't know what to do
[17:07] <phatmonkey> i've got a few software things i want to write like merging the roll and pitch and adding "aggressiveness" to the servos before i branch it off for the car
[17:07] <phatmonkey> aggressiveness, as in, moving immediately to a servo position or smoothing it out
[17:08] <phatmonkey> like accelerating immediately instead of accelerating gradually, or pulling out of a dive immediately or gradually
[17:08] <phatmonkey> it'll be useful
[17:08] <jcoxon> at the mo i just want to check that it even works
[17:08] <phatmonkey> yeah, alright
[17:08] <jcoxon> any pointers would be great
[17:08] <jcoxon> i'm really at a dead end
[17:08] <phatmonkey> your original gps has the same chipset as the new one i have here actually, what sort of accuracy did you get?
[17:08] <phatmonkey> are you using the software from that heli?
[17:08] <jcoxon> hmmm pretty standard accuracy
[17:09] <jcoxon> was a long time ago though since i've used it
[17:09] <jcoxon> phatmonkey, yeah
[17:09] <jcoxon> though i'm not doing the multichannel bit
[17:09] <phatmonkey> yeah
[17:09] <phatmonkey> my gps here seems to jump about incredibly little just sitting inside by a window
[17:09] <phatmonkey> i need to hook up some batteries so i can log it outside
[17:10] <jcoxon> hehe i can't believe i'm having issues with creating a device file
[17:12] <phatmonkey> surely it should create the device files on loading the module
[17:12] <jcoxon> nope, nothing
[17:14] <phatmonkey> odd
[17:15] <phatmonkey> i don't know much about device files and all that... the distributions i use just do it all for me
[17:15] <phatmonkey> ah here we go
[17:15] <phatmonkey> did you use the makefiles that came with it
[17:15] <phatmonkey> it's all in src/Makefile
[17:16] <jcoxon> yup
[17:16] <jcoxon> did make
[17:16] <jcoxon> copied the module accross
[17:16] <jcoxon> across*
[17:17] <phatmonkey> see src/Makefile
[17:17] <jcoxon> ooooo
[17:17] <phatmonkey> it executes commands on the gumstix
[17:17] <phatmonkey> obviously you won't want them
[17:17] <phatmonkey> because they're for multiple channels
[17:17] <phatmonkey> but all you need is probably there
[17:19] <jcoxon> oooo it moved
[17:19] <jcoxon> mwhwhwhwhwhwhwhwhhwhw ITS ALIVE
[17:20] <phatmonkey> sweet
[17:20] <phatmonkey> now get an electronic speed controller :P
[17:20] <phatmonkey> then you get a regulated 5v off the main battery pack tooo!
[17:20] <phatmonkey> i've ordered some servo extension leads that i can hack up... i don't want to mess up my car
[17:22] <phatmonkey> hmm, software...
[17:22] <phatmonkey> what do we want the car to do?
[17:22] <phatmonkey> follow a set of waypoints?
[17:22] <phatmonkey> for starters anyway
[17:23] <jcoxon> tis a good question
[17:23] <jcoxon> the problem is the poor accuracy of gps
[17:24] <phatmonkey> we'll have to see
[17:24] <phatmonkey> inaccurate gps might not be an issue at speed
[17:24] <phatmonkey> then small, slow movements can just be estimated by time
[17:24] <phatmonkey> or some other speed sensor
[17:29] <jcoxon> right well i can make both servos move in one direction
[17:29] <jcoxon> so they work
[17:29] <jcoxon> now the other way...
[17:34] <jcoxon> so if you echo "a" in it causes the servo to move one way
[17:34] <jcoxon> how would you move it the other way?
[17:37] <phatmonkey> you probably need to specify pulse widths for the PWN signal
[17:37] <phatmonkey> 1.5ms is centre i believe, +/- 0.5ms
[17:39] <phatmonkey> take a look at bluerc_rx.c to see how to use i
[17:39] <phatmonkey> t
[17:39] <jcoxon> i will, once i've worked out how to do channels
[17:40] <phatmonkey> oh, the messages are generated in _tx.c
[17:40] <jcoxon> yeah, rc just forwards them
[17:53] <jcoxon> can i load a module twice?
[17:54] <jcoxon> one module for each servo
[18:18] <jcoxon> pxa_mpwm: MPWM on gpio -1: nchans=2 tmin=1843 tmax=5529 tpause=1843 tsync=44236
[18:18] <jcoxon> pxa_mpwm: channel 0 of pin 0 on gpio 61
[18:18] <jcoxon> pxa_mpwm: channel 1 of pin 0 on gpio 62
[18:18] <jcoxon> pxa_mpwm: Initialized successfully
[18:19] <jcoxon> hmm time for a break
[18:19] <jcoxon> bbl
[21:01] <jcoxon> hmmmm the servos only move when the module is unloaded
[21:04] <phatmonkey> hey james
[21:04] <jcoxon> hey ben
[21:05] <jcoxon> not making much progress here
[21:05] <phatmonkey> trying to get makefiles all set up for our software... sigh
[21:05] <phatmonkey> damn, i thought it was working earlier?
[21:05] <jcoxon> well
[21:05] <jcoxon> it moved
[21:06] <jcoxon> but that was when the module was unloaded
[21:06] <jcoxon> and the pin was pulled high
[21:06] <phatmonkey> yeah
[21:06] <phatmonkey> are you sure you're sending the right data/commands?
[21:06] <jcoxon> well thats the thing
[21:06] <jcoxon> no i'm not sure
[21:06] <jcoxon> cause i don't really know how
[21:06] <jcoxon> (i'm awful at programming well C at least)
[21:07] <phatmonkey> when the modules are loaded is the servo locked?
[21:07] <phatmonkey> can you move it?
[21:07] <jcoxon> yes you can move it
[21:08] <phatmonkey> hmm, so no PWM signal is being sent
[21:08] <phatmonkey> i guess you have to initialise it... or it's not working
[21:08] <phatmonkey> i'll have a look at those bluetooth sources
[21:08] <jcoxon> i don't think on its own hte module sends a signal
[21:08] <jcoxon> it needs a signal from else where
[21:08] <jcoxon> so i need to work out what to send to the /dev/mpwm0
[21:10] <phatmonkey> yeah, i'll take a look
[21:10] <jcoxon> thanks
[21:13] <phatmonkey> it's an 8 bit integer
[21:13] <phatmonkey> in the format....
[21:14] <phatmonkey> uh
[21:14] <phatmonkey> some rather nice mixing, ooh
[21:14] <phatmonkey> ok
[21:14] <phatmonkey> an array of 8 bit integers is being sent
[21:15] <jcoxon> oh right
[21:16] <phatmonkey> no, a char array
[21:16] <phatmonkey> so, er, basically an 8 bit integer as an ascii character for some reason (?!)
[21:16] <phatmonkey> sort of shows my awesome knowledge of C
[21:17] <phatmonkey> hehe, anyway
[21:17] <phatmonkey> the rx and driver might provide more clues
[21:17] <jcoxon> hmm
[21:18] <jcoxon> so if i wack together a small c program
[21:18] <jcoxon> that rights a char array to /dev/mpwm0
[21:18] <jcoxon> we should see some movement
[21:18] <phatmonkey> not sure, one sec
[21:21] <phatmonkey> halright, i understand
[21:22] <phatmonkey> yes, it does seem to be a string of length MAX_CHANS
[21:22] <phatmonkey> and i guess you only have one channel
[21:23] <jcoxon> okay
[21:24] <jcoxon> now i think i may have found an issue
[21:24] <jcoxon> servos require 5v
[21:25] <jcoxon> and i'm probably only giving out 3.3V
[21:25] <jcoxon> poo
[21:26] <phatmonkey> yup
[21:26] <phatmonkey> 4.8v to 6v
[21:27] <jcoxon> how did ChRoMicro get away with it
[21:27] <phatmonkey> guess they ran it off the BNC from the electronic speed controller ;)
[21:28] <phatmonkey> so, just a simple C program
[21:28] <jcoxon> hmmm
[21:29] <jcoxon> http://www.gumstix.org/tikiwiki/tiki-index.php?page=PWM
[21:29] <phatmonkey> that'll pass unsigned char channels[1] to that device... i think
[21:42] <jcoxon> right well i'll leave all this till tomorrow
[21:42] <jcoxon> night all
[21:42] jcoxon (n=jcoxon@81-178-106-132.dsl.pipex.com) left irc: "I'm Elivized !"
[00:00] --- Wed Aug 16 2006