#robotics Logs
Feb 17 2014
#robotics Calendar
00:00 GargantuaSauce not sure how i managed to do that
00:03 Celelibi GargantuaSauce: I don't think it's the same problem you just stated.
00:03 Fiesta i have been briefly discussing some triangle math a few days ago though, maybe there was a memory of that.
00:04 GargantuaSauce Celelibi: it will be a mixture of the two scenarios, dependent on how much the wheel is slipping
00:04 Celelibi The torque needed in your scenario is gravity times mass times distance wheel-centerOfMass
00:05 Celelibi And the more you lift the robot, the less force you need.
00:07 Celelibi Anyway, do you have an idea if the price of the motors who would be powerful enough to do that? :p
00:07 GargantuaSauce no because i know exactly nothing about your robot except it has four wheels
00:07 Fiesta i'd think the most amount of force required would be to keep the robot horizontal. (ie: assuming it can be horizontal without touching the ground). In a segway this would be if you were leaning forwards and almost touching the ground with yoru face.
00:07 Fiesta The LEAST amount of force would be when it's upright, and also when it's upside down (likely not possible, it would have crashed into the ground by then)
00:07 Celelibi I don't know anything either.
00:08 Celelibi But basically, it would have the minimum that makes it alive.
00:08 Celelibi motors, wheel, controller, and a battery big enough to power the four motors.
00:10 Celelibi Fiesta: yes, but my idea to begin with, was accelerating enough to lift the robot.
00:11 Celelibi Starting from a speed 0.
00:11 Fiesta ah so the pendulum starts horizontal, yeah you're going to start with the highest torque requirement and it'll go down from there
00:12 Fiesta can the pendulum go down past horizontal? how high is the robot?
00:12 Fiesta i assume the pendulum can hit the ground yes?
00:12 Celelibi The robot doesn't exist yet.
00:13 Fiesta well... the hypothetico-robot
00:13 Fiesta hypitheticobot
00:13 Celelibi The idea is a 4x4 that could lift itself to an inverted pendulum state.
00:13 Celelibi I'll assume it start for horizontal position.
00:13 Fiesta you mean to ballance on 2 wheels?
00:14 Celelibi yes.
00:14 Fiesta ah
00:14 Fiesta like that segway wheelchair which starts on 4 wheels but can hop up to 2
00:15 Celelibi I don't know that.
00:15 Celelibi Or maybe I've seen it, but it change its geometry to lift two wheels.
00:16 Fiesta yes i suppose it does
00:17 Fiesta i guess it'd be like doing a wheelstand in your 4x4, and getting out and standing on the top during.
00:20 Fiesta a vid of it https://www.youtube.com/watch?v=lTrqcDspEOU
00:24 Celelibi Yes, it's all about changing the geometry.
00:24 Celelibi It first move the center of mass until the front wheel are useless, and then lift them.
00:24 Celelibi It's cheating. :p
00:25 Fiesta i suppose you need to know the torque required because you're deciding on what motors to use yeah?
00:27 Fiesta would it use less torque to go in reverse, and then go forwards while you still have the backwards inertia? or would that be the same amount of torque.
00:27 Fiesta wait a sec. is this a literal full sized 4x4 car?
00:27 Celelibi I guess it's the same torque in any case.
00:27 Celelibi No, just a toy. :)
00:28 Fiesta phew
00:28 Celelibi I'm not building a war weapon. :p
00:29 Celelibi That shit in real life size would be damn dangerous.
00:29 Fiesta i bet those big wheeled drag-cars could do it
00:29 Celelibi That's true.
00:30 Fiesta hah, would make for an interesting moment
00:31 Fiesta does it actually matter that your robot is 4 wheeled? i mean, i'm not sure those front wheels are going to be adding any useful torque
00:31 Fiesta you could skimp on them
00:32 Celelibi It's because I want it to be usable as a classical 4x4. :)
00:32 Celelibi And lift just for the show. :p
00:33 rue_house ok I think I have what should be working code for a PD servo loop controller with a serial interface
00:33 rue_house I can try it out this week
00:34 Fiesta they could still be usable motors for driving, but just not have the torque required to do a wheelie. I bring it up because if you're worried about not having enough torque, then it shows that you are prepared to size things down. I mean you're not just buying the strongest motor you can afford, you're asking.
00:34 Fiesta but being able to do a wheelie forwards or backwards would simplify things
00:36 Celelibi Actually I have no idea what kind of motors would be powerful enough to do that.
00:36 Celelibi money, mass, power consumption can become the limitating factor.
00:37 Celelibi And I'm thinking that a brake may be able to provide more torque than any motor.
00:38 Celelibi (Did you see that cube with reaction wheels that can stand on its edge or vertex?)
00:38 Fiesta yeah
00:39 rue_house yea
00:39 Celelibi It provide a rotating acceleration with a brake.
00:39 Fiesta it would complicate things
00:39 Fiesta those cubes don't need wheels like your 4x4 does
00:43 Celelibi Yes, I was just thinking about moving fast and braking from the front wheels.
00:43 Fiesta ooh
00:43 Fiesta it won't be as impressive but it'll work
00:44 Fiesta i'm not sure i've heard of brakes on an RC car toy before
00:44 Fiesta that'll be new
00:45 rue_house hmm, I could display oall the power supply into on a 1x40 display
00:45 rue_house ... or a 2x20
00:50 Celelibi Fiesta: I think I've seen some motors with brakes.
00:50 rue_house you dont need a motor with a brake, you just put it in reverese
00:50 rue_house SET : CH1: 10V 5A CH2: 5.0V 5A
00:50 rue_house READ: CH1: 10V 0.5A 5W CH2: 5.0V 1.0A 5W
00:50 rue_house I1='a' V1='b' I2='c' V2='d' >_
00:51 rue_house I think I like this layout for the terminal interface to my new power supply
00:51 Fiesta but then we're back to teh torque problem
00:51 Celelibi Exactly.
00:51 rue_house are we making reaction wheels?
00:51 Celelibi The idea of the brakes was to not rely on the motors torque to produce torque.
00:52 rue_house you cant control brakes enough tho
00:53 rue_house you need to control the deceleration rate
00:53 Celelibi rue_house: we're just changing the initial frame of reference to a fast moving one. :p
00:53 rue_house carefully
00:53 Celelibi In which case, brakes can produce an acceleration.
00:54 Celelibi You need to control the deceleration or compute the right initial speed.
00:57 rue_house Bench Power Supply, rue 300W model A
00:58 rue_house MODEL: BPSRUE300A
00:58 rue_house SET: CH1: 10V 5A CH2: 5.0V 5A
00:58 rue_house READ: CH1: 10V 0.5A 5W CH2: 5.0V 1.0A 5W
00:58 rue_house USER: I1='a' V1='b' I2='c' V2='d' >_
00:58 Celelibi What is this?
00:58 rue_house I'm working out a console interface to my new bench power supply
00:58 Celelibi ok
00:59 rue_house http://eds.dyndns.org/~ircjunk/projects/newpower/p1050856.jpg
01:00 rue_house gonna just give it a text console, hook in with any terminal program
01:01 rue_house hmm I need to come up with a serial opto isolation link too
01:02 rue_house and DACs I need to work out DACs
01:05 rue_house I havn't been this excited about a simple project in a while
01:06 rue_house I'm havingn troubles with the current sensing tho
02:31 Jak_o_Shadows I appreciate this pdf: http://www.thomsonlinear.com/downloads/screws/Neff_LeadScrews_bruk.pdf
05:27 bear- hello
05:27 Jak_o_Shadows hi
05:28 bear- I was wondering if you guys have seen this news: http://www.bbc.co.uk/news/business-26075808
05:28 bear- it's about a robotics lab in Israel
05:30 joga heh, the wallclimber was cute
05:31 joga a gyro balanced nxt is far from warfare though...
05:34 bear- what do you thing the wallclimber uses to climb?
05:34 bear- magnets, perhaps?
05:35 joga looked like suction cups to me, dunno
05:35 Jak_o_Shadows well, it is a flash video, so I had to open another browser
05:36 Jak_o_Shadows Definitely magnet.
05:38 bear- yeah, so I thought
05:39 bear- it doesn't seem extremely useful
05:39 Jak_o_Shadows Could solve a couple of problems for a pipe explorign robot.
05:39 Jak_o_Shadows Means you don't have to worry about slopey bits of the pipe
05:42 bear- ah, I see now
05:42 bear- that makes more sense
05:42 bear- thanks
07:22 GuShH_ rue_house: I found your perfect vehicle http://www.amazon.com/JL421-Badonkadonk-Land-Cruiser-Tank/dp/B00067F1CE/ref=sr_1_3?tag=ohmy0c-20
07:24 GuShH_ Customers Who Viewed This Item Also Viewed> Looking For-Best of David Hasselhoff > Uranium Ore > Fresh Whole Rabbit
07:24 GuShH_ HAHAHA
07:24 GuShH_ A Million Random Digits with 100,000 Normal … - The RAND Corporation
07:24 GuShH_ oh god that's so you.
08:11 GuShh_Lap2 rue_house: looking at the first things I turned... I can see "some" (being modest) improvement
08:11 GuShh_Lap2 but in my defense it was the tool's fault at first.
08:12 GuShh_Lap2 added an extension to the quill lock lever, it was way too short... I didn't want to machine one from scratch so I turned the shaft down, about half way through to a slightly bit over 8mm, turned a new handle and drilled it 8mm, press fitted it using the quill and the chuck. It could use some knurling but so far so good, doesn't look pretty but it works fine.
08:13 GuShh_Lap2 since it's M6 I could just turn a new one and use stainless steel threaded rod for the core, I just wasn't feeling like it.
09:15 rue_house mine has a nice big plastic handle on the quil lock, I get the feeling you have the 'more economy' version
09:15 rue_house does yours have the threading gearbox?
11:49 MrCurious every time for the past few days when i peek in here, i see gushh and rue talking about metric threading... no variation
12:37 robotustra but it's good, isn't it?
12:43 MrCurious i suppose, if everyone finds metric threading as compelling as i do...
12:59 MrCurious guess not everyone has presidents day off
13:07 sherlock its "family day" over here in ontario (but not everyone gets that off)
13:07 sherlock I work via billing hours
13:07 sherlock so im working anyway
13:14 MrCurious holliday == self training dy when you want a new job
15:15 robotustra about to go home soon
17:05 MrCurious DOOMED!!!! DOOMED!!!! DOOMED!!!! http://live.slooh.com/
17:07 rue_bed dssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn']
18:56 MrCurious i have been using vi for about 2 years now
18:56 MrCurious mostly because i cant figure out how to exit it
19:01 robotustra_ :)
19:02 robotustra_ :q!
19:02 Tom_itx ESC:wq
19:02 Tom_itx save and quit
19:02 Tom_itx ESC:q quit no save
19:03 robotustra_ it's the only command I know in vi if I accidently get into it
19:06 robotustra_ http://www.youtube.com/watch?v=Pwqot_hBhyU
19:06 robotustra_ 190 cm
19:06 robotustra_ 500 parts
19:06 robotustra_ 30 kg
19:12 MrCurious ZZ
19:13 MrCurious with alll the cats in this house, isuspect my house is made of the cat equivalent of GINGER BREAD
19:20 rue_house hmm, no room mate
19:22 Tom_itx too quiet for you?
19:22 GargantuaSauce both my roommates moved out so i have the place to myself
19:22 Tom_itx no kat either
19:22 GargantuaSauce and i am liking it a little too much
19:29 rue_house GargantuaSauce, true that
19:30 rue_house "I object, it was just a nudge!... he just happened to be off balance at the time..."
19:31 MrCurious suspecting GargantuaSauce is not currently wearing clothes
19:31 rue_house huh, apparently the cats were stepping on the keybaord today...
19:32 rue_house robotustra, papercraft?
19:33 rue_house MrCurious, that implies you have to now
19:33 robotustra_ plywood craft
19:38 MrCurious http://live.slooh.com/ once again... DOOM,, DOOM, DOOM....
19:42 rue_house can you understand russian?
19:44 robotustra_ http://www.youtube.com/watch?v=KV09TEjfFQE
19:44 robotustra_ I'm russian BTW
19:44 robotustra_ or byelorussian
19:45 rue_house http://www.youtube.com/watch?v=SO1VSODPhYo <-- that is that about?
19:45 rue_house er, what is that about?
19:46 robotustra_ mushroom costs more than gold
19:46 rue_house oooh, its a mushroom, heh
19:47 robotustra_ worm mashroom
19:47 rue_house is it illegal?
19:47 robotustra_ called "KARDICEPS"
19:47 robotustra_ it's legal but it's a "traditional" chinese medicine
19:47 rue_house oh
19:48 robotustra_ it's sold on weight of gold
19:48 robotustra_ 1 g of mushroom == 1 g of gold
19:48 rue_house dont teach them about 'plumping'
19:49 robotustra_ "jartsa gumbu"
19:50 robotustra_ chinese prononsation
19:52 robotustra_ in 25 minutes we'll se asteroid
20:00 MrCurious in soviet america, astroid sees you!
20:10 robotustra_ watches you
20:10 robotustra_ nukes you
20:12 rue_house must aquire more technology!
20:15 MrCurious 2 mintue warning
20:15 MrCurious the next sound you hear may be your brain extruding out your ears
20:17 MrCurious loving the music.... they must have an in house DJ
20:19 MrCurious ITS COMMING RIGHT AT US!
20:21 MrCurious 300 yards across
20:21 MrCurious 17k MPH
20:22 MrCurious 9x distance to moon
20:23 MrCurious wonder what the margin of error is on an asteroid pass by?
20:23 MrCurious certainly mo more than 10x distance to moon...
20:24 rue_shop2 ok! I have PD code to test!
20:33 MrCurious hmmm they said it already passed. but still no imagry
20:44 rue_shop2 sweeeet, the ethernet isolated 9V supplies will work for feeding the current sense on my power supply
20:51 MrCurious 34 minutes in, no meteor they have lost my attention
21:09 robotustra_ I spotted the asteroid on the picture
21:10 robotustra_ it's in x=77/186, Y=63/160 from left bottom corner of the picture
21:13 rue_shop2 I think the clock rate isn't set right
21:14 rue_shop2 9600 at 16Mhz is...
21:14 rue_shop2 600 at 1Mhz
21:14 rue_shop2 bastards dont do 600
21:15 robotustra_ what are you doing?
21:23 rue_shop2 testing the uart interfaced servo controller I wrote
21:24 rue_shop2 its an encoder->pwm/dir version
21:24 rue_shop2 the code has a bug, there is a pin you can short to get the servo to transmitt its base address, and its not working
21:25 rue_shop2 its supposed to send it in ascii, everything else it speaks in bitmapped binary
21:25 rue_shop2 but its talking
21:25 rue_shop2 Servo 000: version: 13
21:25 rue_shop2 autodetect works
21:26 rue_shop2 its an interesting code hybrid
21:27 robotustra_ I'm thinking of zeroing position of my robot eyes
21:27 rue_shop2 I mashed my analog feedback+uart quad loop controller into the code for a single encoder based PD loop thats serial controlled
21:27 robotustra_ but I don't illuse uart
21:27 rue_shop2 robotustra, rolled back into its head ofcourse
21:27 rue_shop2 so when its not initialized, you can tell
21:27 rue_shop2 :)
21:27 rue_shop2 this is a generic position loop controller
21:28 rue_shop2 1) One time listen and chain address
21:28 rue_shop2 2) Call servo to attention
21:28 rue_shop2 3) Dismiss servo
21:28 rue_shop2 4) Power up
21:28 rue_shop2 5) Power down
21:28 rue_shop2 6) Set position
21:28 rue_shop2 7) Get position
21:28 rue_shop2 8) Get device model
21:28 rue_shop2 9) Goto cached position
21:28 rue_shop2 10) Set cached position
21:28 rue_shop2 11) Preset to current position
21:28 rue_shop2 12) Get current
21:28 rue_shop2 13) Autodetect servos
21:28 rue_shop2 14) Position list
21:28 rue_shop2 99) Exit.
21:28 rue_shop2
21:28 rue_shop2 Selection >
21:28 rue_shop2 thats my manual interface
21:28 MrCurious http://www.dragoninnovation.com/projects/32-pulsedlight-single-board-range-finder-minimodule <-- for your robot robustra... for a 3rd minds eye
21:30 robotustra_ LIDAR
21:30 rue_shop2 awe damn, my encoder isn't working
21:30 robotustra_ to the trash
21:30 rue_shop2 I need to be able to monitor positions
21:30 robotustra_ I have only 2 command in my robot eye
21:31 robotustra_ 1) jump to some position
21:31 rue_shop2 the command set it set up to co-ordinate up to 256 servo loops
21:31 robotustra_ 2) set position
21:31 rue_shop2 with addressing optimization
21:31 robotustra_ what will you do with 256 servos?
21:31 rue_shop2 so I can do large synchronous operations
21:31 rue_shop2 robotustra, its all about unreasonable limits
21:32 rue_shop2 and you never know
21:32 rue_shop2 256 might not be enough one day
21:32 robotustra_ my robot will have 95 dergee of freedom
21:32 rue_shop2 I have a pretty big box of gearmotors beside me here
21:32 robotustra_ 256 is not needed at all
21:33 rue_shop2 my library is getting that I can just about turn anything into a servo
21:33 robotustra_ I hope that power will not exceed 200 Watts
21:33 robotustra_ height no more than 5'
21:33 rue_shop2 I have to hunt a code error
21:33 robotustra_ and weight not more than 30 kg
21:33 rue_shop2 the interrupts must not be firing
21:33 robotustra_ do you use git?
21:34 rue_shop2 I'm hoping my 12' mecha wont weigh over half a tonne
21:34 rue_shop2 no
21:34 robotustra_ it's the best error hunter
21:34 rue_shop2 setupEncoder();
21:34 rue_shop2 sei(); // turn interrupts on
21:35 rue_shop2 oh god
21:35 robotustra_ using diff between commits you can track what you had changed and what was the change in the behavior
21:35 rue_shop2 input!=output
21:35 rue_shop2 oh I hope i didn't just fry my encoders
21:35 rue_shop2 ....again...
21:35 rue_shop2 |INPUT << PD2 |INPUT << PD3
21:36 e_shop2 scratches head mor
21:36 robotustra_ I don't even know how I lived without git all this long time
21:36 rue_shop2 version control dosn't work for me, I just walk filenames
21:36 robotustra_ I did it before version control
21:36 rue_shop2 case 7: // get servo position
21:36 rue_shop2 if (argument == ID0){ reply = PackBits(AdcValues[1], ReplyPos);}
21:36 rue_shop2 oh that would be wrong...
21:36 robotustra_ it's a debug tool
21:38 rue_shop2 hows does it help you debug
21:38 robotustra_ today I had found very unclear bug
21:38 robotustra_ at work
21:38 robotustra_ very easily
21:38 robotustra_ 1) do commit 1
21:38 rue_shop2 volatile signed int position;
21:38 robotustra_ 2) do modification of code
21:39 robotustra_ 3) notice the changes
21:39 robotustra_ 4) do another commit
21:39 robotustra_ 5) repeat
21:39 rue_shop2 nono I just merged two extremely differnt code branches
21:39 rue_shop2 there was nothing working from the getgo
21:39 robotustra_ and now it's working?
21:40 rue_shop2 nope
21:40 robotustra_ so
21:40 rue_shop2 I'm going thru tests
21:40 robotustra_ start from working copy
21:40 rue_shop2 the comm test passed
21:40 rue_shop2 mostly
21:40 robotustra_ and gradually add new code
21:40 rue_shop2 robotustra, this is toooo big a merage
21:40 robotustra_ and what of it?
21:40 rue_shop2 no worries, I know what I'm up to
21:40 rue_shop2 :)
21:40 rue_shop2 but thanks
21:41 robotustra_ you know how humans apeared?
21:41 robotustra_ by virtual modification of genome
21:41 robotustra_ not merge of 2 genomes
21:41 robotustra_ remember that
21:42 rue_shop2 god got a shock off his doorknob that cause a rip in space-time and spawned the temporary instantanious universe we live in
21:42 rue_shop2 his roomates teasted him about it later.
21:42 robotustra_ how to make 1 unworking program: merge 1 working or unworking program with another unworking program
21:43 rue_shop2 these were both working, my odds are good
21:43 rue_shop2 I just need to iron the seam more
21:43 robotustra_ I usualy take 1 working code
21:44 robotustra_ and add new code gradually
21:44 rue_shop2 yea, i'm usually the one preeeching that
21:44 rue_shop2 thanks
21:44 robotustra_ after adding a new portion I test it, make sure that it works, do commit and continue
21:45 rue_shop2 volatile signed int position;
21:45 robotustra_ even if I need to remove an old code I comment it, and if I don't need this code for 2-3 commits I'll remove it
21:45 rue_shop2 if (argument == ID0){ reply = PackBits(position, ReplyPos);}
21:45 robotustra_ what compiler do you use
21:46 rue_shop2 #define PackBits(V,P) (((V << 5) & 0xFF00)|(V & 0x07)|0x8000|(P<<3))
21:46 rue_shop2 gcc
21:46 rue_shop2 hmm yea...
21:46 e_shop2 thinks how to deal with this incompatabi
21:47 rue_shop2 the serial protocol is only designed for 10 bit values
21:48 rue_shop2 thats actaully an interesting design bump
21:48 rue_shop2 if its an encoder...
21:48 rue_shop2 its not revolution limited
21:48 robotustra_ I would rather use inline function than define
21:48 rue_shop2 and I'd probably want more than a 0-1023 range
21:49 rue_shop2 robotustra, gcc will not inline it, the define works better
21:49 robotustra_ I use IAR compiler
21:49 rue_shop2 hmm I wonder if I shoudl scale the values, because the loop will need a few encoder counts for error anyhow
21:50 robotustra_ it's do about 50% more compact code with comparison to gcc
21:50 rue_shop2 robotustra, isn't that windows?
21:50 rue_shop2 robotustra, with or without -O3
21:50 robotustra_ yes, windows
21:50 rue_shop2 I dont use windows
21:50 rue_shop2 it wastes too much of my time
21:51 robotustra_ it depend on your hands actually
21:51 robotustra_ I use windows/linux depending on my needs
21:51 rue_shop2 I also dislike the ads everywhere, and the way it thinks it knows best
21:51 robotustra_ do you know what is ADBlock?
21:52 rue_shop2 I use one on firefox
21:52 robotustra_ so?
21:52 rue_shop2 I also use flashblock
21:52 robotustra_ what the problemwith ads?
21:52 rue_shop2 they get in my way, and are uaually annoying
21:52 rue_shop2 esp when they come up as much as they do in windows
21:53 robotustra_ I did firmware for eyes on windows, now I'll go to linux to do communication with eyes
21:53 rue_shop2 hmm I used signed values...
21:53 robotustra_ and read frames
21:53 rue_shop2 hmm
21:53 robotustra_ but you should use unsigned
21:53 rue_shop2 I cant do 0-1023 with my cnc
21:54 rue_shop2 1023 counts over 256mm
21:55 rue_shop2 .25mm
21:55 rue_shop2 hmmmmmmmm
21:55 rue_shop2 that not that bad
21:55 rue_shop2 its not good
21:56 rue_shop2 I'd have to rework the whole protocol
21:57 MrCurious http://hardkernel.com/main/products/prdt_info.php the U3 is out....
21:57 MrCurious $59 for a quad core 2ghz
21:57 rue_shop2 [0][c3][c2][c1][c0][v2][v1][v0]
21:57 rue_shop2 [1][v9][v8][v7][v6][v5][v4][v3]
21:58 rue_shop2 where [c] is the command and [v] is a value bit
21:58 rue_shop2 I could add another [1][v16][v15][v14][v13][v12][v11][v10]
21:59 MrCurious this place is like twitter. everyone talks, only not to each other :P
21:59 rue_shop2 the existing code would ginore the extra word
21:59 rue_shop2 I'm listing to you
21:59 rue_shop2 how else would I know what to ignore :)
21:59 MrCurious no you are not
21:59 MrCurious ok, i will conceede you that point
22:00 rue_shop2 your right, I shoudl use unsigned, but I already knew that
22:01 rue_shop2 no, no it wont ignore the word, it'll assume its a new set with the same first word
22:01 rue_shop2 if (state == 0) {
22:01 rue_shop2 if ((data & 0x80) == 0) {
22:01 rue_shop2 state = 1;
22:01 rue_shop2 command = (data >> 3);
22:01 rue_shop2 argument = (argument & 0xFFF8) | (data & 0x07); // glue in its 0 through 2
22:01 rue_shop2 }
22:01 rue_shop2 } else {
22:01 rue_shop2 state = 0;
22:01 rue_shop2 if ((data & 0x80) != 0) {
22:01 rue_shop2 argument = (argument & 0x0007) | ((data & 0x7F) << 3); //glue in bits 3 through 9
22:02 rue_shop2 return servoCmd(command, argument);
22:02 rue_shop2 }
22:02 rue_shop2 }
22:02 rue_shop2 ugh, thats a horrid state engine
22:05 rue_shop2 making that unsigned is gonna completely screw over the PD calculations
22:05 rue_shop2 error = cmdpos[0] - position ;
22:05 rue_shop2 differ = lastError - error;
22:05 rue_shop2 termP = limit(error/10, -Plim, Plim);
22:05 rue_shop2 termD = limit(differ, -Dlim, Dlim);
22:05 rue_shop2 reaction = ((termP * Kp) - (termD * Kd));
22:06 rue_shop2 damn tabs
22:10 rue_shop2 oo I fogot about tear off menus
22:10 rue_shop2 widnows dosn't even have menus anymore
22:10 rue_shop2 its not even got windows
22:11 rue_shop2 ooooh
22:11 rue_shop2 k
22:12 rue_shop2 well I know why the PD control loop isn't working
22:12 rue_shop2 I fogot to copy in the part of the code that sets the flag to do the calclations
22:12 rue_shop2 :)
22:13 robotustra_ cooler plate weights more than my robot's head
22:13 rue_shop2 heh
22:13 rue_shop2 led?
22:13 rue_shop2 oooh my, ok, I... need to make lots of changes...
22:14 rue_shop2 it talks to me tho, thats cool
22:15 robotustra_ I don't even start to write program before I write full algorythm on paper
22:16 robotustra_ but you prefare do the mess, ok
22:16 robotustra_ :)
22:18 rue_shop2 hmmm my old code timed the PID calcs off the ADC conversions, the new code uses the PWM overflow...
22:18 rue_shop2 robotustra, not normally
22:18 rue_shop2 I dont do this often
22:18 rue_shop2 its kinda a hack to get soemthing wroking so I can play
22:18 rue_shop2 but I build everything modular, these SHOULD *just* fit togethor
22:18 rue_shop2 :)
22:20 rue_shop2 hah, plugging in the encoder helps...
22:20 rue_shop2 :) Ihave positions now!
22:22 rue_shop2 enable the timer overflow interrupt...
22:23 robotustra_ MrCurious: I whould better to wait till ODROID-U8
22:23 robotustra_ I hope it will come soon
22:24 rue_shop2 ok this is starting to come togethor
22:24 rue_shop2 I think I need food tho
22:27 rue_shop2 AHA! no motor power!
22:27 rue_shop2 that would casue exactly this problem I'm having
22:28 rue_shop2 and now I have a new problem
22:28 rue_shop2 I have a < backwards somewhere
22:30 rue_shop2 heh so close!
22:32 rue_shop2 wtf, how did I do this.. on and off are kinda backwards
22:33 rue_shop2 #define pwm0on() SetBit( COM01, TCCR0)
22:33 rue_shop2 #define pwm0off() ClearBit( COM01, TCCR0)
22:33 rue_shop2 hmmmmm
22:35 rue_shop2 ... ?
22:35 rue_shop2 HOW is that on and off?
22:37 rue_shop2 one of the COOL things today was that the usb-ttl modules I got from china are the PERFECT pinout to match my avr boards
22:41 MrCurious because it turns a timer on or off
22:41 MrCurious and the timer is what toggles th pwm
22:42 MrCurious TCCR0 will be what you want to search the chip doc for... rue_shop2
22:59 rue_house but thats not COM01
22:59 rue_house that would be CS
23:02 MrCurious section 14.3 of the dataheet if its an atmega328
23:02 MrCurious cs is a few bits of tccr0