#robotics Logs

Jan 07 2018

#robotics Calendar

12:03 AM rue_mohr: damnit, why dont they have a format character for printing numbers in binary for printf!
12:09 AM anonnumberanon: I have that. Was an intersting K&R exercise.
12:13 AM anonnumberanon: Im working on it now
12:18 AM rue_mohr: remember to look for ways to use the built in hardware to help the processor
12:18 AM rue_mohr: think of whats available on a m328
12:18 AM anonnumberanon: Carry flag?
12:20 AM rue_mohr: the two instructions are gonna need to be clever to cause the effect of all 8 bits reversing
12:20 AM anonnumberanon: NO SHIT SHERLOCK
12:20 AM anonnumberanon: ;)
12:29 AM anonnumberanon: If i xor with 0xff, i get something that only needs rotated 4 times to get the result
12:29 AM anonnumberanon: Bit thats not 2 instructions its 5
12:29 AM anonnumberanon: Instructions
12:29 AM anonnumberanon: And by rotated i med RORed
12:30 AM rue_mohr: hardware
12:30 AM rue_mohr: what hardware will do it for you
12:30 AM anonnumberanon: The ALU? Dunno.
12:30 AM anonnumberanon: Looking harder
12:31 AM rue_mohr: the GPU?
12:31 AM rue_mohr: maybe the Bit Processor Unit? :)
12:31 AM rue_mohr: I think it'll occur to you in the shower or on a pillow
12:32 AM rue_mohr: but dont take your pillow to the shower, thats trying too hard
12:36 AM rue_mohr: HOW THE HELL HAS EVERYONE NOT REALIZED THIS CODE DOSN'T DO WHAT THE DOCUMENTATION SAYS IT DOES!
12:41 AM anonnumberanon: Ok i got a potential solutuion
12:41 AM anonnumberanon: Dont know why nop would be needed though
12:41 AM rue_mohr: the nop is needed for real world crap
12:42 AM anonnumberanon: Are we thinking of the same solution :) ?
12:42 AM rue_mohr: dunno
12:42 AM anonnumberanon: U 1st
12:42 AM rue_mohr: hahah nice, I wont fall for it
12:42 AM anonnumberanon: Lol
12:42 AM anonnumberanon: I wansnt trying to trick u
12:42 AM rue_mohr: full points for crafy social engineering tho
12:43 AM anonnumberanon: EOR r1, 0xFF
12:43 AM anonnumberanon: NOP
12:43 AM anonnumberanon: SWAP r1
12:43 AM rue_mohr: you did look at that sample code, right?
12:43 AM anonnumberanon: No
12:43 AM rue_mohr: you know that swap just swaps the nibbles
12:43 AM anonnumberanon: Which one
12:43 AM rue_mohr: ugh
12:44 AM anonnumberanon: On the datasheet?
12:44 AM rue_mohr: rue_mohr> http://paste.debian.net/1003842/
12:44 AM rue_mohr: <rue_mohr> same result as that code
12:44 AM rue_mohr: <rue_mohr> but using 3 assembler instructions
12:44 AM anonnumberanon: Yeah like i said thats exactly what i needed
12:44 AM anonnumberanon: Xor with ff then rotate all by 4
12:45 AM anonnumberanon: Swap will rotate all by 4 positions
12:45 AM rue_mohr: swap takes 12345678 and makes it 56781234
12:45 AM anonnumberanon: Lets see that example now that i am free from being influenced by some other solution
12:45 AM anonnumberanon: Yes i know read what i said
12:46 AM rue_mohr: your goal is to take 12345678 and make it into 87654321
12:46 AM anonnumberanon: 12345678 swap
12:47 AM anonnumberanon: =56781234
12:47 AM anonnumberanon: 56781234 xor ff is
12:47 AM anonnumberanon: 87654321
12:47 AM rue_mohr: just the binary compliment
12:48 AM rue_mohr: 55^0F=5A
12:48 AM anonnumberanon: So without the unnecessay nop its 2 instructions 2 cycles
12:48 AM rue_mohr: you need the nop, and otherwise ya
12:51 AM anonnumberanon: Ok ok yeah that c code is quite heavy once compiled
12:51 AM rue_mohr: :) duh
12:52 AM anonnumberanon: I winder if the compiler would do anything with it probably not
12:52 AM rue_mohr: the compiler cant utilize the hardware to optimize the process
01:01 AM anonnumberanon: Lets see if this can also be done with COM or NEG. Need a refresher on ones and twos comp.
01:02 AM rue_mohr: are those hardware systems?
01:02 AM anonnumberanon: Ah yeah ones comp just toggles the bits
01:02 AM rue_mohr: is it a timer? or a counter, or a adc?
01:02 AM anonnumberanon: So that can be used instead of eor FF
01:03 AM rue_mohr: your still in the inner box
01:04 AM rue_mohr: stop looking at instructions and look over the hardware systems
01:04 AM rue_mohr: what can manipulate bits for you
01:08 AM anonnumberanon: Why is that relevent?
01:08 AM rue_mohr: that is the whole point of what i'm trying to get thru to you
01:09 AM rue_mohr: you CANT do this with just 3 instructions
01:09 AM rue_mohr: you CAN use 3 instructions to get a HARDWARE system to do it for you
01:09 AM rue_mohr: 8-| do you get it?
01:10 AM rue_mohr: on small processors, you leverage the hardware to make up for a lack of brute force cpu power
01:10 AM anonnumberanon: The only hardware thats useful to use is timer interrupts. There is nothing else i know that does a "hardware operation"
01:10 AM rue_mohr: ponder it
01:11 AM rue_mohr: when you get it, a new world will open up for you
01:11 AM anonnumberanon: Well the underlying system is the "hardware"
01:11 AM rue_mohr: if I tell you, you will never be able to leverage the knowledge, its just a thing
01:12 AM anonnumberanon: Where some things may be done a lot faster
01:12 AM anonnumberanon: I took vhdl class
01:12 AM anonnumberanon: Its all about speed
01:12 AM rue_mohr: ok, what general form would your vdhl be in?
01:13 AM anonnumberanon: Bus contention is the speed limit
01:13 AM anonnumberanon: What?
01:13 AM rue_mohr: how would you do this in vdhl?
01:16 AM anonnumberanon: Well i just would. Then the compiler puts logic gates together to make the operation analog-fast
01:17 AM rue_mohr: follow it, see if, by working it out in vdhl, you notice a system on the avr that can be configured to do the same thing
01:18 AM anonnumberanon: http://upvector.com/atmega/atmega168_pdip_block.png
01:29 AM anonnumberanon: rue_bed> anonnumberanon, do you like the really high freq rf stuff?
01:29 AM anonnumberanon: not particulary, from lack of knowledge of it
01:30 AM anonnumberanon: just like wireless shit
01:30 AM anonnumberanon: was just posting this cause it's cheap and it's a market ready hardware
01:30 AM rue_mohr: the 4G wont penetrate anything, it just bounces
01:30 AM anonnumberanon: bluetooth ble
01:30 AM rue_mohr: 900M can push thru walls and stuff
01:30 AM anonnumberanon: post a chip?
01:31 AM anonnumberanon: was just posting this cause it's cheap and it's a market ready hardware
01:31 AM rue_mohr: k
01:31 AM anonnumberanon: but also cause it's the big brother, bit harder to use successor to nrf24l01, which is what i used already and was happy with it
01:32 AM anonnumberanon: but i kind of want to write a library for the nrf24l01
01:33 AM anonnumberanon: https://www.youtube.com/watch?v=DvF3AsTglUU
01:35 AM rue_mohr: dear god, why are there books on computer image processing from 1976!
01:36 AM anonnumberanon: simple, because they don't want you to know how to do it anymore
01:36 AM rue_mohr: gonna RLE compress a 4x4 image!
01:36 AM rue_mohr: http://ieeexplore.ieee.org/document/1162805/?denied
01:36 AM rue_mohr: ARG
01:36 AM rue_mohr: since 1976 there MUST have been a leak!
01:36 AM anonnumberanon: book or journal?
01:37 AM rue_mohr: I DONT CARE i JUST NEED TO READ IT
01:37 AM rue_mohr: I need to know WTF brenner says
01:37 AM rue_mohr: cause the interpretations of it all seem broken and nobody understands them
01:37 AM rue_mohr: hey wait
01:37 AM rue_mohr: aren't you in uni?
01:38 AM rue_mohr: is there someone here in university?
01:38 AM anonnumberanon: veverak,
01:38 AM rue_mohr: veverak, !
01:38 AM anonnumberanon: theBear sounds like he is in university too
01:39 AM rue_mohr: he's not
01:39 AM anonnumberanon: you should ask him
01:39 AM anonnumberanon: oh you killed the joke
01:39 AM rue_mohr: dear god, that book/article was the cornerstone of almost everything done today
01:40 AM anonnumberanon: aaron shwartz died for trying to help you read it
01:47 AM * anonnumberanon waits on a chip link
01:48 AM rue_mohr: m328?
01:49 AM anonnumberanon: <rue_mohr> 900M can push thru walls and stuff
01:49 AM anonnumberanon: anonnumberanon> post a chip?
01:49 AM anonnumberanon: <rue_mohr> k
01:49 AM rue_mohr: 900m is just cb radio
01:49 AM anonnumberanon: anonnumberanon> post a chip?
01:49 AM rue_mohr: I'm trying to find a 1976 document right now
01:49 AM anonnumberanon: <rue_mohr> k
02:09 AM rue_mohr: 1976 Rader CM, Brenner NM. A New Principle for Fast Fourier Transformation Ieee Transactions On Acoustics, Speech, and Signal Processing. 24: 264-266. DOI: 10.1109/TASSP.1976.1162805
02:10 AM rue_mohr: 2 pages!!! WTF DO THOSE 2 PAGES SAY!!!!
02:11 AM rue_mohr: technically 3 pages
02:12 AM rue_mohr: freaking 3 pages that changed the way the world works
02:19 AM anonnumberanon: what's his first name?
02:21 AM anonnumberanon: rue_mohr, what you're toolchain for stm32f103? do you use libopencm3 and openocd on linux? (bonus points for answering instead of replying with a question)
02:21 AM rue_mohr: how about you get the tar, and look at the makefile?
02:22 AM rue_mohr: haha no bonus points for rue
02:22 AM rue_mohr: hahahahah fail
02:22 AM rue_mohr: http://ruemohr.org/~ircjunk/programming/c/stm32/stm32.tgz
02:27 AM anonnumberanon: ah ok so it's a yes, thanks
02:28 AM rue_mohr: HAHAHAHA YES!!!! MY CODE AGREES WITH SOMEONE!!!!
03:30 AM rue_mohr: YES, now two things agree
03:33 AM mrdata: do you mean, your fft code produces the same result as someone else's?
03:34 AM mrdata: or would that be too good to hope for
03:34 AM rue_mohr: no
03:35 AM rue_mohr: I'm just working with the table binary inversion reindexing code
03:35 AM rue_mohr: it looks like nobody understand the origional code
03:35 AM rue_mohr: they just copy it
03:36 AM mrdata: :/
03:36 AM rue_mohr: m=n/2;
03:36 AM rue_mohr: while (m >= 2 && j > m) {
03:36 AM rue_mohr: j -= m;
03:36 AM rue_mohr: m = m/2;
03:36 AM rue_mohr: }
03:36 AM rue_mohr: j += m;
03:36 AM rue_mohr: its an interesting composure
03:36 AM rue_mohr: for lots of reasons
03:37 AM rue_mohr: its funny, back in 94, I wrote code for a towers of hanoii problem, that I think did almost exactly that
03:37 AM rue_mohr: i REALLY WISH I could still get at that code
03:37 AM mrdata: looks suspiciously familiar
03:37 AM rue_mohr: everyone copies it
03:37 AM rue_mohr: I'm not going to
03:38 AM rue_mohr: I'm going to fill the array with indexes determined by a state machine that will generate the correct sequence
03:38 AM rue_mohr: cause i dont walk down no beaten paths
03:39 AM rue_mohr: apparently that code is a translation from code in a paper written in 1976
03:40 AM rue_mohr: BUT I DONT HAVE ACCESS TO THE 3 PAGES SO I CANT COMPLETELY TELL
03:40 AM rue_mohr: oh, and everything in the world is based on those 3 pages
03:40 AM rue_mohr: https://www.codeproject.com/Articles/9388/How-to-implement-the-FFT-algorithm
03:41 AM rue_mohr: figure 1 is out of context
04:42 AM rue_mohr: sweet, I wrote code to write the state machine for loading the reverse binary indexed array
04:42 AM rue_mohr: if that didn't melt my brain, maybe I'm safe
04:57 AM veverak: copypaste code used everywhere?
04:57 AM veverak: like that one for 3D collision of triangles? :)
04:58 AM rue_mohr: http://paste.debian.net/1003868/
04:58 AM rue_mohr: so far I'm doing ok figuring things out
04:59 AM veverak: nice! :)
05:00 AM rue_mohr: just dont ask me the meaning of the complex component of an adc value, or the meaning of a negitive freq, and its all good.
05:01 AM rue_mohr: its 3am tho, I'm gonna get sleep
06:03 AM anonnumberanon: now -18C out here
11:41 AM Tom_itx is now known as Tom_L
01:21 PM rue_mohr: 5c here
01:21 PM mrdata: -7C here
01:24 PM rue_mohr: hmm I suspect it'll get colder here
01:24 PM rue_mohr: wow, almost 12:00
01:24 PM rue_mohr: wtf time was I up to last night?
01:24 PM rue_mohr: ugh
01:28 PM Tom_L: early
01:29 PM Tom_L: maybe i'll mount some switches today
01:29 PM Tom_L: or work on the Z axis motor mount
01:29 PM rue_bed: got a plan for the spindle?
01:31 PM rue_bed: is the speed on the sherline regulated by that opto or by the motor emf?
01:31 PM mrdata: it's warming up,, here
01:31 PM mrdata: will be thawing tomorrow
01:47 PM anonnumberanon: same
01:48 PM anonnumberanon: they announced 65% of snow over a few hours in the early afternnoon tomorrow
03:00 PM rue_mohr: hahahaha
03:00 PM rue_mohr: hahahahah
03:00 PM rue_mohr: ok, so
03:00 PM rue_mohr: they have this whole process in an fft to re-arrange the incomming data
03:00 PM rue_mohr: and
03:00 PM rue_mohr: and get this
03:00 PM rue_mohr: hahaha
03:00 PM rue_mohr: get this
03:01 PM rue_mohr: ok, so, all the time-domain data (from the adc) is given a complex value of 0
03:01 PM rue_mohr: haha you gonna love this
03:01 PM rue_mohr: hahaha
03:01 PM rue_mohr: ok ok
03:01 PM rue_mohr: so, when they re-arrange the data
03:01 PM rue_mohr: hah
03:01 PM rue_mohr: they, GET THIS
03:01 PM rue_mohr: they carefully re-arrange all the zeros too
03:01 PM rue_mohr: hahahaha ISNT THAT AWESOME!
03:01 PM rue_mohr: hahahah
03:04 PM * rue_mohr falls off his chair laughing
03:06 PM rue_mohr: I'm really dissapointed in the cambridge numberical methods book tho
03:06 PM rue_mohr: there are other things they didn't catch
03:07 PM rue_mohr: (their function can do ifft, so its not an issue there)
03:18 PM THX1338: Hey guys, which microcontroller are recommend to use in 3d printers homemade?
03:18 PM THX1338: I think to use arduino, but i'm not sure if are the best option
03:18 PM veverak: they suck
03:19 PM veverak: not really better alternative
03:19 PM veverak: np
03:19 PM rue_mohr: THX1338, m328 cause marlin is already written
03:19 PM rue_mohr: er sorry
03:19 PM rue_mohr: m2560 cause marlin is already written
03:19 PM veverak: yeah, that or smoothieboard with smoothieware
03:19 PM veverak: cos that is less tragic code
03:20 PM veverak: or maybe Marlin got better...
03:21 PM THX1338: This https://github.com/msrd0/MarlinAnycubicI3 ?
03:22 PM THX1338: looks nice, thanks :)
03:22 PM rue_mohr: marlin didn't get better use smoothie if you want
03:23 PM THX1338: i will checkout smoothie
03:24 PM THX1338: Just another question, why arduino sucks?
03:24 PM rue_mohr: cause all the libraries have errors in them
03:24 PM rue_mohr: nothing really works right, just most of the time, people can get by with it
03:25 PM rue_mohr: code the avr driectly yourself
03:25 PM rue_mohr: arduino hardware is great, cause it made avrs cheap and available
03:25 PM rue_mohr: arduino is just a bootloader, library set, and ide
03:26 PM rue_mohr: if you dont need it, dont bother, if your learning, its good to ease getting into it all
03:27 PM THX1338: nice, got it, i never have trouble with but is because i never use to big stuffs, i'm a beginner
03:28 PM THX1338: thanks anyway, i will check the marlin and smooth*
03:28 PM rue_mohr: well, play with it as arduino, and when you get curious, ask us how to get into low level coding
03:29 PM THX1338: ya, thanks a lot
04:07 PM Tom_shop: ok, working on switch mounts
06:54 PM veverak: A. spacex launching soon
06:54 PM veverak: B. any tips for printing big parts
06:54 PM veverak: like
06:54 PM veverak: https://imgur.com/a/5PSFA
06:54 PM veverak: it's 550x225mm
06:55 PM SpeedEvil: git gud.
06:55 PM SpeedEvil: you mean the roller?
06:55 PM veverak: no, the black pools
06:55 PM veverak: the roller is easy
06:55 PM veverak: :)
06:55 PM SpeedEvil: What's it for?
06:56 PM veverak: diy http://www.gardensdecor.com/cdn/img/chic-decorative-water-fountain-shop-houzz-jeco-inc-jeco-inc-patio-decorative-tabletop-leaves.jpg
06:57 PM SpeedEvil: Segmenting it is one option
06:57 PM veverak: I think only one
06:58 PM veverak: with 200x200 prusa
06:58 PM veverak: I think that 2x8 pieces is doable
06:58 PM SpeedEvil: You can also go all teh way.
06:58 PM veverak: nah
06:58 PM veverak: 2x3
06:58 PM SpeedEvil: And make it out of flat planes, which you glue in the curved bits into
06:58 PM veverak: means, 6 pieces
06:58 PM veverak: SpeedEvil: 4 pieces not doable
07:11 PM veverak: hmm, the segmentation is tricky
07:29 PM rue_mohr: hahahah "free range carrots"
07:56 PM Tom_L: ok, X axis switches located
07:56 PM Tom_L: need to get some longer screws though
07:57 PM rue_mohr: did that happen yesterday?
07:57 PM Tom_L: no it happend just now
07:58 PM Tom_L: i misjudged and had to turn one bracket aruond
08:02 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/X_Axis_limit_stops.jpg
08:02 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/X_Axis_limit1.jpg
08:02 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/X_Axis_limit2.jpg
08:03 PM Tom_L: the spacer is laying next to the switch waiting for longer screws
08:15 PM rue_mohr: lets see
08:15 PM rue_mohr: perfect
08:16 PM rue_mohr: nice
11:20 PM rue_mohr: https://en.wikipedia.org/wiki/Gray_code
11:20 PM rue_mohr: nobody told me about this encoder thing!
11:27 PM rue_mohr: oh crap, where is the company that provides me with my email
11:29 PM rue_mohr: oooh crap