#robotics | Logs for 2016-02-03

Back
[00:09:27] <rue_house> and my 120W power converter is finish with just 1 error
[00:09:53] <rue_house> the enable locks both the output transistors full on (of the push pull transformer driver)
[00:21:35] <rue_house> https://hackaday.io/project/296-bench-power-supply/log/31246-test-power-amp-finished
[00:37:17] <mbrumlow> bop
[00:37:20] <mbrumlow> anybody up
[00:38:08] <Snert> sortakindamaybe
[00:39:47] <mbrumlow> any clue why when I switch direction fast on my moters it casues my system to freak out and reboot?
[00:40:00] <mbrumlow> system in question :( http://pluto.brumtopia.com:8080/indexl.html
[00:40:06] <orlock> back EMB, motors acting as generators..?
[00:40:13] <orlock> EMF, even
[00:40:26] <mbrumlow> Hmm.
[00:40:55] <mbrumlow> I thought my motor controler would ahve protection for that :/
[00:41:18] <mbrumlow> I will go digging around to figure out how to handle that properly.
[00:41:31] <mbrumlow> Its like the last thing that bugs out on that system.
[00:41:45] <orlock> maybe current draw
[00:41:50] <orlock> got resistors and caps in place?
[00:41:54] <orlock> and diodes?
[00:42:08] <mbrumlow> I was thinking current draw
[00:42:27] <mbrumlow> I think I have caps on the motors.
[00:42:33] <mbrumlow> no diodes
[00:42:46] <mbrumlow> I don't have it in front of me right now.
[00:43:01] <mbrumlow> Left it at work to mess with the cleaing people.
[00:43:35] <mbrumlow> It usess a portable laptop charger.
[00:43:47] <mbrumlow> Oh, the more volts I use the worse the problem gets.
[00:43:51] <mbrumlow> Like right now its at 9v
[00:43:56] <Snert> by cap I think we mean 4,700uF - a pretty good sized filter cap.
[00:44:16] <Snert> 1000 might do, maybe 2200
[00:44:21] <mbrumlow> but if I say run it at 18v it happens more often.
[00:44:29] <mbrumlow> Yeah, tht is what I was meaning by caps too :p
[00:45:19] <mbrumlow> I think I have some 4,700uF I will give them a try .
[00:45:54] <Snert> switch to another PSU and see if that changes things too.
[00:46:24] <Snert> like a bigass psu if you're talking motors.
[00:47:26] <Snert> then again, no mention has been made of motor size or currentdraw to run the motor
[00:47:40] <Snert> so it's a shot in the dark.
[00:49:28] <mbrumlow> Yeah, sorry, don't hae that info with me right now :(
[00:49:31] <rue_house> mbrumlow, are you using a PIC microcontroller?
[00:50:03] <mbrumlow> rue_house: nope, intel edison.
[00:51:48] <Hyratel> oh
[00:51:53] <Hyratel> i think i see what's going on
[00:52:25] <Hyratel> mbrumlow, if you're reversing from full forward, you're having to first brake and then accelerate the motor
[00:52:55] <Hyratel> you're applying something like twice the force to bring it to a stop
[00:53:14] <Hyratel> power-reverse is twice as rough as motor braking or accelerating from stop
[00:53:39] <Hyratel> so you might be having a momentary extremely deep voltage sag int eh system
[00:53:44] <rue_house> I havea large robot that, if you slam into reverse, exerts so much ground current, the votlage from ground to + drops enough for the controller to black out
[00:53:56] <Hyratel> rue_house, ^ exactly so
[00:54:44] <rue_house> which causes it to go back to its default 100% drive signal, sending it into an uncontrolled galavant thru the shop and its tables, chairs, and people.
[00:54:51] <Hyratel> if the motor is rated for 30A inrush, and you have a 12v system, the Vbatt can drop sharply, down to ~8v on a lead acid battery
[00:55:15] <mbrumlow> hmm
[00:55:26] <Hyratel> if you try to power-reverse, you're probably going to see twice the rated inrush
[00:55:43] <Hyratel> does your system have encoders/tachometers?
[00:56:36] <mbrumlow> I have encoders built in to the backs of the moters, but I have not wired them in yet (another issue, it drifts to the left)
[00:56:48] <Hyratel> suggestion:
[00:56:57] <Hyratel> can your controllers do motor braking?
[00:57:04] <mbrumlow> Yes.
[00:57:42] <Hyratel> can you toggle this by a software input, or is it a jumper on the controller?
[00:58:20] <mbrumlow> Software, I currently moter break when I stop.
[00:58:33] <mbrumlow> motor*
[00:59:01] <Hyratel> brake
[00:59:11] <mbrumlow> that too.
[00:59:16] <mbrumlow> :p
[00:59:26] <mbrumlow> Its a bit late for me at this point :/
[01:00:41] <mbrumlow> Are you suggesting that when I swich from going full forward to first motor brake?
[01:01:57] <Hyratel> yes
[01:02:23] <Hyratel> brake until you're at no more than 25% RPM (or something) and then you can power reverse
[01:02:36] <mbrumlow> I will give that a shot when I get to work.
[01:03:03] <Hyratel> also
[01:03:21] <Hyratel> you want a tank capacitor and blocking diode on your micro's power supply
[01:03:41] <Hyratel> if you have Vbatt -> regulator -> micro
[01:03:45] <Hyratel> change it to
[01:03:56] <mbrumlow> I think I have the cap, but not the diode.
[01:04:10] <Hyratel> Vbatt -> Blocking diode -> DC tank capacitor -> regulator ->//
[01:04:31] <Hyratel> if you have a tank cap but no diode, it'll drain first when there's heavy loading
[01:05:46] <mbrumlow> This is all awesome information I wish I had knew when I built the thing.
[01:06:41] <mbrumlow> I was mostly wanting to deal with the software end of things, but it turns out that there is way way more than just getting the parts togather to make a proper running system.
[01:08:22] <mbrumlow> Thanks for the information. I have some things to try now :)
[01:08:35] <mbrumlow> I can hardly keep my eyes open so I am going to go to bed now.
[01:08:40] <mbrumlow> Night. And thanks agian.
[01:09:55] <Hyratel> ta
[01:17:19] <rue_bed> ok, at some points eqv4 became eqv5
[01:17:24] <rue_bed> hmm
[02:49:38] <deshipu> foul_owl: unfortunately no, it can be different even for the same model of servos
[12:03:47] <foul_owl> deshipu: Wow interesting. So each servo must be tuned by hand eh? Do higher end servos not suffer from this issue?
[12:12:15] <deshipu> foul_owl: the "robotics" don't have this problem, as far as I know
[12:12:22] <deshipu> foul_owl: "robotic servos"
[12:12:28] <deshipu> foul_owl: aka "smart servos"
[12:12:52] <deshipu> foul_owl: I also expect more expensive servos to have more consistent parameters
[12:17:45] <foul_owl> Ahh ok
[12:18:18] <foul_owl> If you send your servo a signal that is out of range, can it damage the servo?
[12:18:33] <foul_owl> Ie, it's trying to turn but it can't and will cause the plastic gears to crack?
[12:21:33] <deshipu> yes
[12:21:48] <deshipu> well, usually not immediately
[12:22:06] <deshipu> traditionally 1500µs is the middle of the range
[12:22:19] <deshipu> and you can go about 400-600µs both ways
[12:28:03] <Loshki> "A mere two years after RoMeLa started building full-size humanoids, the AdultSize CHARLI-2 also won the Louis Vuitton Humanoid Cup for Best Humanoid."
[12:46:08] <deshipu> Chappie
[12:59:30] <foul_owl> But the servo itself doesn't have any protection against sending it a signal that will cause it to rotate in a way where it will damage itself, even if the output shaft is not connected to anything?
[12:59:52] <deshipu> no
[13:00:18] <deshipu> fun, eh?
[13:12:48] <foul_owl> Hmm yeah that's no good o_O
[13:13:14] <foul_owl> In the process of determining min and max range, it seems easy to have the servo crash into itself
[13:16:36] <deshipu> nah, start from 1500
[13:16:43] <deshipu> and slowly increase/decrease
[13:16:53] <deshipu> switch it off when you see it reached maximum
[13:17:04] <deshipu> you can tell easily that it did, as it will make noise
[13:25:34] <z64555> *crunch crunch clack crunch*
[13:36:10] <deshipu> more like bzzzzzt
[13:43:41] <z64555> My servos are second hand, tho
[13:46:30] <foul_owl> Ah ok
[13:46:50] <foul_owl> Thanks!
[13:47:12] <deshipu> you probably want to leave some margin
[13:47:17] <foul_owl> For sure
[13:47:19] <deshipu> not make it go to the absolute maximum
[14:15:49] <foul_owl> Makes sense
[14:17:04] <foul_owl> I'm basically just trying to build this: http://www.thingiverse.com/thing:34829
[14:17:15] <foul_owl> Do you know of a good simulation tool that will run on Linux?
[14:19:46] <deshipu> ROS has some simulation things build in
[14:20:00] <deshipu> there is also Gazebo, but it's kinda advanced
[14:47:13] <foul_owl> Thanks!
[14:48:07] <foul_owl> For that arm, it looks like the servo for axis1 is holding up the entire assembly. I'm a bit concerned about the strain on the output shaft for the turntable having to hold up the whole thing
[14:48:31] <foul_owl> Is there a procedure for simulating that or do I just have to build and hope it doesn't break?
[14:48:46] <rue_house> thats why I made the robot arms I made
[14:49:05] <rue_house> to show the world to NOT lanace the whole arm on the ahsft of a servo and how to do proper counterbalancing
[14:49:29] <rue_house> https://hackaday.io/project/2189-robot-arm
[14:53:59] <deshipu> foul_owl: take a look at MeArm
[14:54:32] <deshipu> foul_owl: it uses a cool trick to get most of the weight close to the base
[14:54:48] <deshipu> rue_house: counterbalancing doesn't help with inertia, though
[14:55:37] <rue_house> no
[14:56:17] <rue_house> it just means all the motor power goes into the load
[14:56:24] <rue_house> insteadof into holding up the arm
[14:57:10] <rue_house> http://ruemohr.org/~ircjunk/robots/arm8/slide.htm
[14:57:13] <deshipu> into the load and into accelerating/stoping
[14:57:18] <rue_house> on the arms that followed I tuned other thigns up
[14:57:36] <rue_house> http://ruemohr.org/~ircjunk/robots/arm9/slide.htm
[14:58:12] <rue_house> one day maybe those buttons will work on my sideshow script
[14:59:33] <deshipu> I only get an error page
[14:59:55] <rue_house> what does it say?
[15:00:11] <rue_house> are you using opera or soemthing?
[15:00:25] <deshipu> ILLEGAL UNHANDLED NULL POINTER EXCEPTIONAL FAULT.
[15:01:14] <deshipu> I'm using a web browser, one that downloads HTML over HTTP and renders it
[15:01:18] <rue_house> those are the comments silly
[15:01:40] <rue_house> http://ruemohr.org/~ircjunk/robots/arm9/
[15:01:47] <rue_house> the directories are browsable
[15:02:30] * deshipu shrugs and goes to do something productive
[15:03:04] <rue_house> yea the new one runs an arm processor
[15:07:27] <rue_house> there are 3 arms I built like that using servos
[15:07:43] <rue_house> I have an input capture 'arm' I can use to operate them realtime
[15:07:51] <rue_house> or record points or motion to file
[15:19:08] <rue_house> I need a syntax for my command line calculator to define a function
[15:19:23] <deshipu> forth!
[15:20:19] <rue_house> no, it takes regular math syntax and calculates
[15:20:39] <rue_house> but if a user wanted to define a function I'm trying to think of how that might go
[15:21:02] <rue_house> {D(x,y)=x+y}
[15:21:06] <deshipu> how did intercal do it?
[15:21:14] <rue_house> I suppose if there are just built-ins its fune
[15:21:26] <rue_house> dont know intercal
[15:23:36] <rue_house> the point of the code isn't actually to write a calcultor, its to have the ability to incorperate math strings into other programs
[15:24:02] <rue_house> there is no library out there you can just pass "5*7+2" and get back a number
[15:24:22] <deshipu> um
[15:24:22] <rue_house> the best ones you ahve to insantiate a bunch of objects and preparse it and stuff
[15:24:36] <rue_house> and they cant maintain a set of variables over multiple calculations
[15:27:00] <deshipu> if you say so
[15:27:22] <deshipu> I'm always amazed how good other people are at figuring out non-existence of things
[15:28:11] <deshipu> like, you hear "the science has no explanation for this phenomenon"
[15:28:35] <rue_house> the closest I could find is python
[15:28:45] <deshipu> it's amazing, really, you can know that off the top of your head, literally totality of human knowledge
[15:29:00] <anonnumberanon> should be : "science has no explanation for this", or "the science behind this says that..."
[15:29:21] <rue_house> and part of what I dont want to do is back a huge, bloated, compromisable library into all my C programs
[15:29:35] <anonnumberanon> Which lib?
[15:29:38] <rue_house> I just wanna parse simple meth strings
[15:30:01] <anonnumberanon> For parsing meth you'll need a lab.
[15:30:05] <rue_house> I'v written a basic math parser
[15:30:10] <anonnumberanon> I meant for parsing math you'll need a lib.
[15:30:12] <deshipu> if only someone wrote a simple embeddable scripting language, like lua or tcl
[15:30:13] <anonnumberanon> =)
[15:30:35] <rue_house> deshipu, again, huge and full of exploits
[15:31:06] <anonnumberanon> deshipu, I hope not or embedded engineers will see their wages diminish hugely.
[15:31:20] <rue_house> all you have to do is pass the string to my library and it returns the answer
[15:31:50] <anonnumberanon> cool
[15:32:08] * z64555 Passes "What is the answer to life, the universe, everything!" to rue's lib
[15:32:26] <deshipu> rue_house: can the functions you define in it be recursive :3
[15:32:34] <anonnumberanon> No i think it has to be a math question, your question is a "dumb human question".
[15:32:35] <anonnumberanon> =)
[15:33:00] <deshipu> anonnumberanon: I think Göedel has the equivalent, though :P
[15:33:57] <deshipu> it's surprisingly how just adding a little bit of generality or flexibility throws you into the Turing tar pit
[15:34:27] <deshipu> all you need is someting like basic integer algebra
[15:34:46] <deshipu> and BAM -- Turing-complete
[15:34:57] <anonnumberanon> I just got an FTDI USB ttl converter for checking whether my serial code works.
[15:35:34] <deshipu> and does it?
[15:35:47] <deshipu> also, did it get bricked by the new drivers? ;)
[15:36:06] <anonnumberanon> Heh, can't play with it yet I have to look for work for at least 4 hours first.
[15:36:22] <anonnumberanon> Kinda just woke up and went to the post to pick up the converter.
[15:36:45] <anonnumberanon> Ow wait ill plug it in now in Windows and see what's up.
[15:38:49] <anonnumberanon> Huh, excellent, everything is good driver-side.
[15:39:11] <rue_house> calc "What-is-the-answer-to-life-the-universe^everything"
[15:39:12] <rue_house> Unable to perform calculation, What-is-the-answer-to-life-the-universe^everything -->> 42
[15:39:24] <rue_house> zippo:/tmp# calc "What-is-the-answer-to-life-the-universe^everything"
[15:39:25] <rue_house> Unable to perform calculation, What-is-the-answer-to-life-the-universe^everything -->> 42
[15:39:43] <rue_house> anything it cant do results in 42
[15:40:38] <anonnumberanon> deshipu, related to your comment on lua and stuff for micros, what would you want it to do better than Arduino?
[15:42:15] <deshipu> anonnumberanon: interactive console really makes prototyping easier
[15:42:28] <anonnumberanon> Some desktop application?
[15:42:29] <deshipu> anonnumberanon: and introspections really helps in debugging
[15:42:39] <deshipu> anonnumberanon: nah, can be over serial
[15:43:01] <anonnumberanon> Yeah you could have a desktop application talking to your micro with serial.
[15:43:20] <deshipu> I just use screen for that
[15:43:26] <anonnumberanon> It's my plan to look into making one.
[15:43:29] <deshipu> the point is, you can write code in that console
[15:43:37] <deshipu> and it gets executed as you press enter
[15:43:45] <deshipu> and you can see the results immediately
[15:43:51] <anonnumberanon> Ah I see, so then probably you'd need some bootloader. Don't know.
[15:44:06] <deshipu> no, you would need an interpreter running on the micro
[15:44:09] <rue_house> zippo:/tmp# calc "A+B-C((A=2)(B=5)(C=8))"
[15:44:09] <rue_house> A+B-C((A=2)(B=5)(C=8)) -->> -1
[15:44:15] <deshipu> and there are such
[15:44:24] <deshipu> micropython, nodemcu, espruino
[15:44:25] <rue_house> being able to do stuff like that on command line is nice
[15:44:35] <rue_house> whats the closest you can com up with?
[15:44:49] <deshipu> perl -e? :)
[15:44:49] <z64555> something something python?
[15:45:03] <anonnumberanon> rue_house, Bash can do this I think can't it?
[15:45:07] <rue_house> so, go for it
[15:45:14] <deshipu> I don't need it
[15:45:20] <rue_house> use variables so you can easy chang the numbers and keep re-entering it
[15:45:33] <rue_house> do show
[15:45:41] <deshipu> I'm perfectly fine with micropython, really
[15:46:30] <deshipu> rue_house: try it for yourself: http://micropython.org/live/
[15:46:48] <anonnumberanon> rue_house, I do have the calculator I wrote in one of the K&R programs...
[15:46:58] <rue_house> my libary isn't show up usefull as a command line calc, its really for being embedded in things
[15:47:50] <rue_house> but I like mine cause it can be easy to play with values
[15:48:02] <anonnumberanon> They want me to re-write it with pointers now. The pointers part is not difficult but the calculator was really painful exercise. Really made me sweat heh.
[15:48:13] <anonnumberanon> rue_house, so what are the specs?
[15:48:21] <anonnumberanon> program size, memory usage?
[15:48:32] <anonnumberanon> can use floats?
[15:48:57] <anonnumberanon> can do trig?
[15:49:28] <anonnumberanon> bbl
[15:50:36] <rue_house> it uses all doubles
[15:51:02] <rue_house> as a command lien calc, its a 1563 byte program
[15:51:18] <rue_house> erp wrong line
[15:51:41] <rue_house> 20558 /usr/bin/calc
[15:51:46] <rue_house> so 20.5k
[15:52:07] <rue_house> not sure how to profile a memory usage from it
[15:52:49] <orlock> developers here have been dicking about with the CI/automated testing systems
[15:52:58] <orlock> two git processes were failing, and clashing
[15:53:06] <orlock> each chewing 10G+ gig of ram
[15:53:40] <orlock> one team has sorted their stuff out, so at least the other process fails before the system hits swap
[15:54:07] <orlock> fun fun fun :-\
[15:54:17] <orlock> at least i got some nice stepper motors for free
[15:54:30] <rue_house> I'd say less than 1k of memory
[15:54:49] <rue_house> I ran it in a loop, but ps and top couldn't see it
[15:55:03] <orlock> strace
[15:55:08] <orlock> strace is always the answer
[15:55:57] <anonnumberanon> rue_house, sounds a bit heavy program size for an atmega328 for example, you can also add a chip specifically for that connected UART with your robot's actual chip.
[15:55:58] <rue_house> maybe you can understand this better than me
[15:56:12] <rue_house> its for pc
[15:56:27] <orlock> rue_house: Ever seen a stepper thats actually made in the USA?
[15:56:37] <anonnumberanon> ah okay
[15:56:42] <rue_house> http://paste.debian.net/378414/
[15:56:57] <rue_house> anonnumberanon, why do all pc programs need a gig of memory anyhow?
[15:58:05] <deshipu> it's the law
[15:58:27] <anonnumberanon> the more stuff you can put in memory the faster the response if you're trying to do a sppecific action and want it done fast, for example huge look-up tables I guess.
[15:59:08] <rue_house> xchat is pulling 20M right now..???
[15:59:18] <rue_house> cant be for icons
[15:59:22] <anonnumberanon> I don't know, I'm not a Microsoft developer =)
[15:59:41] <rue_house> orlock, I prolly have a bunch, really old ones
[15:59:47] <z64555> memory's cheap, CPU's are not
[15:59:54] <anonnumberanon> my hexchat is using 28MB right now
[15:59:57] <anonnumberanon> on Windows.
[16:00:01] <rue_house> orlock, can you tell from that, how much memory my program uses?
[16:00:16] <z64555> any graphics being used?
[16:00:26] <rue_house> not xchat
[16:00:29] <anonnumberanon> I was gonna say that.
[16:00:59] <rue_house> unless the background is an array of uncompressed, 24 bit, white pixels
[16:01:16] <anonnumberanon> lol
[16:01:34] <rue_house> http://paste.debian.net/378414/
[16:01:39] <rue_house> is the answer 512 bytes?
[16:02:07] <rue_shop3> :P
[16:02:17] <rue_house> hi zack
[16:02:20] <rue_shop3> hi bob
[16:02:23] <rue_house> I'm ill today
[16:02:26] <rue_shop3> :(
[16:02:32] <rue_house> shall I come cough at you?
[16:02:36] <rue_shop3> sure
[16:02:41] <rue_shop3> im getting there 2
[16:02:54] <rue_house> I can hardly move, my muscles are all latched up
[16:03:01] <anonnumberanon> In retrospect with the utilities of C (malloc and etc..) you'd be able to always keep count of how much memory you are allocating.
[16:04:09] <rue_house> rue_shop3, so whats goin on today?
[16:04:29] <rue_shop3> jumm
[16:04:42] <rue_shop3> new new screws
[16:04:48] <rue_shop3> for my door lock
[16:04:53] <orlock> rue_house: yeah i think so, it depends if you want to include libraries
[16:04:55] <rue_shop3> #8
[16:05:05] <rue_house> k
[16:05:19] <orlock> 282784 + 1743484 for libraries
[16:05:36] <rue_house> http://paste.debian.net/378415/
[16:05:51] <rue_house> most of the space in main is the bit that works out the base to phrase the answer in
[16:06:13] <rue_house> hmm, version should be 5 now
[16:07:32] <rue_house> yay! I got binary and working
[16:07:57] <anonnumberanon> binary addition?
[16:08:01] <anonnumberanon> and operations?
[16:08:17] <rue_house> ./eq "0x5D&0x0F"
[16:08:18] <rue_house> ------
[16:08:18] <rue_house> 0x5D&0x0F -->> 13
[16:08:39] <rue_house> ./eq "0x5D&0x0F(ResultBase=16)"
[16:08:39] <rue_house> ------
[16:08:39] <rue_house> 0x5D&0x0F(ResultBase=16) -->> 0xD
[16:09:04] <z64555> I'd put a space between values and operators...
[16:09:17] <rue_house> ./eq "0x5D & 0x0F(ResultBase=16)"
[16:09:18] <rue_house> ------
[16:09:18] <rue_house> 0x5D & 0x0F(ResultBase=16) -->> 0xD
[16:09:41] <z64555> :)
[16:10:15] <rue_house> I like programs that dont kack on whitespace
[16:10:55] <z64555> kack?
[16:11:18] <rue_house> now damn them for not having operators for NAND and NOR
[16:11:29] <z64555> !&
[16:11:29] <rue_house> are there any left?
[16:11:31] <z64555> !|
[16:11:34] <rue_house> hmm
[16:11:42] <rue_house> I dont know if I have not working yet
[16:12:24] <rue_house> I wonder if my parser can distinguish !& from ! and &
[16:12:32] <orlock> hmm i think i am going to be given the opportunity to change jobs
[16:12:40] <orlock> well, same job, different company
[16:12:53] <z64555> well...
[16:12:56] <orlock> to a place that does professionally what we do for fun here
[16:12:57] <rue_house> oh poo, I need resultbase 2 to work
[16:13:04] <z64555> NAND also is !(A & B)
[16:13:33] <orlock> These people throw out hardware i could never afford to buy
[16:13:35] <rue_house> write me some C to print a long in binary would ya?
[16:14:04] <z64555> can use printf?
[16:14:21] <anonnumberanon> rue_house, I have that for int.
[16:15:36] <z64555> huh. was sure there was a 0b option there
[16:15:49] <orlock> rue: you would love it here, but it might suck all of the fun out of your hobbies
[16:24:26] <z64555> rue_house: here ya go: http://pastebin.com/KaWFTkjx
[16:24:32] <z64555> Haven't tested it, though
[16:25:07] <z64555> yeah, might be safer to swap "val & 1" with "val & 0x01"
[16:25:55] <z64555> aannnd, that inverts the endianess
[16:25:58] <z64555> great.
[16:26:58] * z64555 keeps working at it
[16:37:34] <rue_house> printf cant do binary
[16:37:49] <rue_house> orlock, thats why I dont do it for work
[16:38:25] <z64555> If i had access to the assembly, it would be a cinch
[16:38:37] <rue_house> you do, its called C
[16:38:48] <z64555> just rotate left into the carry, and then print that out
[16:38:51] <rue_house> the language dosn't matter you know
[16:39:05] <z64555> Yeah, but C doesn't have direct access to the registers
[16:39:18] <z64555> You can embed assembler in C, but that's not the same
[16:43:07] <rue_house> ./eq "0x5D & 0x0F(ResultBase=2)"
[16:43:07] <rue_house> ------
[16:43:07] <rue_house> 0b00000000000000000000000000001101
[16:43:16] <rue_house> I should makea library fn that returns the result as a string
[16:43:28] <rue_house> modified it a bit
[16:43:35] <rue_house> for (i = 0x80000000; i > 0; i >>= 1) {
[16:43:35] <rue_house> printf("%c", ((answeri & i) ? '1' : '0'));
[16:43:36] <rue_house> }
[16:44:49] <z64555> eh...
[16:45:29] <z64555> I think it's undefined on the bits being pushed into i from the left
[16:45:57] <z64555> but hey, it works :P
[16:46:22] <rue_house> I'll make something better later
[16:47:15] <z64555> https://en.wikipedia.org/wiki/Bitwise_operations_in_C#Right_shift_.3E.3E
[16:47:24] <z64555> If you set i as an unsigned, it should be safe... ish
[16:48:04] <rue_house> printf("0b");
[16:48:05] <rue_house> for (i = 0x80000000; i > 0; i >>= 1) if ((answeri & i) != 0) break;
[16:48:05] <rue_house> for (; i > 0; i >>= 1) {
[16:48:05] <rue_house> printf("%c", ((answeri & i) ? '1' : '0'));
[16:48:05] <rue_house> }
[16:48:05] <rue_house> printf("\n");
[16:48:07] <rue_house> oh
[16:48:09] <rue_house> easy
[16:49:12] <rue_house> thanks
[16:50:02] <z64555> yw :)
[16:50:53] <rue_house> hmm I dont have ! or ~ in there
[16:51:56] <rue_house> http://paste.debian.net/378422/
[16:51:57] <rue_house> huh
[16:53:02] <rue_house> ./eq "0x05 ^ 0xFF (ResultBase=2)"
[16:53:02] <rue_house> ------
[16:53:03] <rue_house> 0b11111010
[16:53:41] <rue_house> I think not is a problem on the grounds that all operations so far require numbers on both sides
[16:55:35] <z64555> So, when it's expecting a value but comes up with another operator, switch accordingly
[16:56:21] <rue_house> I'v got a logic circuit I want to use my calculator to table out for me, take less time to do it by hand but whatever, I'm ill today
[16:56:37] <z64555> I feel ya
[16:59:53] <rue_house> iiinteresting
[17:00:39] <rue_house> oh, hmm
[17:00:51] <rue_house> "P|E ((P=0x05)(ResultBase=2))"
[17:00:51] <rue_house> ------
[17:00:51] <rue_house> EXTREME WARNING, Functions not supported yet.
[17:00:51] <rue_house> 0b101111
[17:01:03] <rue_house> its seeing the E( ..
[17:01:10] <rue_house> and thinking I'm trying to call a fn called E
[17:01:13] <z64555> that's a new one. "Extreme Warning"
[17:01:28] <rue_house> hmm
[17:02:18] <z64555> ah, this.
[17:02:28] <z64555> is where jmp's come into play
[17:03:21] <rue_house> I told it that if it sees a 'variable' with a '(' right after it, its not a variable, its a function, and thats what its seeing
[17:03:29] <z64555> yeah.
[17:03:44] <rue_house> what it shouldn't do, is think that for
[17:04:21] <rue_house> ./eq "(P|E) ((P=0x05)(E=0x03)(ResultBase=2)))"
[17:04:21] <rue_house> ------
[17:04:21] <rue_house> EXTREME WARNING, Functions not supported yet.
[17:04:21] <rue_house> 0b101111
[17:04:22] <z64555> are you using a syntax similar to anything?
[17:04:32] <z64555> like pearl, maybe?
[17:04:40] <rue_house> it should see the ) and ignore the following )
[17:04:49] <rue_house> no, its just math syntax
[17:05:08] <rue_house> oh, I told it to look for paren, I didn't say specifically an open paren
[17:05:13] <z64555> lol
[17:05:20] <veverak> http://www.atatproject.com/# interesting
[17:05:40] <rue_house> for(iter = this->Head; iter->rhs; iter = iter->rhs) {
[17:05:41] <rue_house> if ((iter->type == VAR) && (iter->rhs->type == PAREN)) {
[17:05:41] <rue_house> iter->type = FUNC;
[17:05:41] <rue_house> }
[17:05:41] <rue_house> }
[17:07:15] <z64555> rue_house: here's a generalized version of print_binary, in case you wanted to use something other than longs.
[17:07:15] <z64555> http://pastebin.com/DUqXN3CT
[17:07:48] <z64555> should work on all int types, signed or unsigned
[17:08:21] <rue_house> there we go
[17:08:55] <z64555> If you want to print out a float, you'd have to cast it to a uint32_t (or uint64_t if it's a double)
[17:09:02] <rue_house> its just a long
[17:09:20] <rue_house> ./eq "(P|E) ((P=0x05)(E=0x03)(ResultBase=2)))"
[17:09:20] <rue_house> ------
[17:09:20] <rue_house> 0b111
[17:09:22] <rue_house> ther we go
[17:09:27] <z64555> :)
[17:09:41] <rue_house> ./eq "sin(x)"
[17:09:41] <rue_house> ------
[17:09:41] <rue_house> EXTREME WARNING, Functions not supported yet.
[17:09:41] <rue_house> sin(x) -->> 42
[17:10:11] <rue_house> 'all unsupported operations result in 42'
[17:10:56] <rue_house> I decided that if someone uses my library in a computer called Deep Thought...
[17:12:07] <rue_house> now it would be nice to have the abilty to define a NOR function
[18:18:19] <rue_house> this is what my library can do for me
[18:18:34] <rue_house> this program uses rules to generate a memory block
[18:18:49] <rue_house> A is the memory address, D is the data at that memory location
[18:19:10] <rue_house> I can tell it to go from 0 to an address and apply the math rules to each location
[18:19:21] <rue_house> Priority | Qualifier | Modifier
[18:19:21] <rue_house> ---------------------------------------------------------
[18:19:22] <rue_house> 50 1 E=A&0x01
[18:19:22] <rue_house> 49 1 P=((A&0x02)!=0)
[18:19:22] <rue_house> 48 1 S=((A&0x04)!=0)
[18:19:22] <rue_house> 47 1 D=E+(P*2)+(S*4)
[18:19:24] <rue_house> 40 1 L=((P|E)==0)
[18:19:26] <rue_house> 39 1 M=S^0x01
[18:19:28] <rue_house> 38 1 X=((L|S)!=0)
[18:19:30] <rue_house> 1 1 D=X
[18:19:32] <rue_house> > view
[18:19:34] <rue_house> 0000: 01 00 00 00 01 01 01 01 - 01 00 00 00 01 01 01 01 ................
[18:19:47] <rue_house> this simulates the logic gates in the phase selector of my power supply
[18:20:08] <rue_house> if I wanted I could write it to a ROM and use the rom as a logic gate array
[18:21:21] <z64555> or bust out the 7400 series chips. :D
[18:21:37] <rue_house> it can save in .ihex format for the eprom writer I have
[18:21:57] <rue_house> if my math lib could do functions, making a sine table would be like 2 lines
[18:22:36] <rue_house> I can use it to make hardware state machines, tho its not the easiest to do so in.
[18:28:16] <rue_house> a 64k rom can give you whatever gate array you want with up to 13 inputs and 8 outputs
[18:30:25] <rue_house> no feedback
[18:59:08] <rue_house> oh look, I made a state machine thats inputs an encoder and outputs serial data
[18:59:09] <rue_house> hah
[19:01:46] <rue_house> oh, and this is a hlaf stepping state machine for a stepper motor
[19:02:50] <rue_house> 0000: 00 09 03 01 06 00 02 00 - 0C 08 00 00 04 00 00 00 ................
[19:02:50] <rue_house> 0010: 00 03 06 02 0C 00 04 00 - 09 01 00 00 08 00 00 00 ................
[19:04:11] <rue_house> I suppose if I wanted, I could use 4 bits for phase, signed and make a 1/256th microstep sequencer
[19:06:10] <rue_house> wow, an 8 bit pwm comparitor...
[19:06:16] <rue_house> halarious
[19:11:31] <z64555> looks like somebody is giddy
[19:21:41] <flyback> BMCC
[19:21:48] * flyback headbutts rue_house
[19:23:19] <flyback> http://www.sra-solder.com/aoyue-2930-programmable-digital-soldering-station
[19:23:23] <flyback> is on it's way
[19:23:55] <flyback> along with some tips, rohs solder, flux and a new heater core for my 968, it's a 968A core which is a better design, they switched from hexagon wire mesh heating coil to spring wrapped
[19:24:13] <flyback> $13 upgrade the old one is 7 yrs old about due to burn out anywyas
[19:24:38] <flyback> couldn't upgrade the iron from a 968 to 968a though :) so had to get a new iron unit
[19:48:09] <anonnumberanon> How much soldering do you do?
[19:55:59] <flyback> not much really
[19:56:02] <jhylands> rue_house, you there?
[19:56:14] <flyback> but my current 2 irons couldn't even melt a large joint
[19:56:23] <flyback> they were more *canucked* than Montezuma
[19:56:39] <jhylands> or rue_shop3 / rue_bed
[20:03:45] <mrdata-> you need big iron
[20:07:11] <flyback> well this one is 75w
[20:07:15] <flyback> that's coming
[20:07:40] <flyback> soon I will have a working 16 port gige managed switch, 5 20+ inch displays and some desktops
[20:07:42] <flyback> once I recap them
[20:17:10] <anonnumberanon> WHAT IS A GIGE?
[20:19:07] <jhylands> gigabit ethernet?
[20:19:15] <flyback> yes
[20:19:28] <flyback> my one canuck friend bought me a used netgear gs724tv2
[20:19:30] <flyback> never worked
[20:19:39] <flyback> the symptoms are consistant with bad caps
[20:19:49] * jhylands lives in Canada
[20:20:04] <flyback> going to recap the mainboard and the psu, the psu is used in several brands and known to go bad but it's not the psu
[20:20:12] * flyback bites jhylands
[20:20:15] <flyback> CANUCK
[20:20:25] <jhylands> indeed
[20:20:29] <flyback> eh-hole
[20:20:38] <flyback> that's for justin beiber and other acts of terrorism!
[20:22:48] <jhylands> I'm responsible for that in the same way that you're responsible for Donald Trump
[20:26:05] <flyback> heh good comeback
[20:26:11] * flyback tosses jhylands a redbull
[20:26:25] * jhylands smiles
[21:32:19] <rue_house> jhylands, whats up?
[22:04:32] <Hyratel> video card with quad-DVI-D Octopus adapter, possibly for Screenwall setups - http://www.newegg.com/Product/Product.aspx?Item=N82E16814139087&cm_re=directx_11_pci_dvi_video_card-_-14-139-087-_-Product