#robotics | Logs for 2016-10-12

Back
[00:01:09] <anonnumberanon> Wow I really do not have interrupt.h that's fucked!
[00:01:14] <anonnumberanon> Now I'm mad.
[00:01:24] <anonnumberanon> Also what do you speak of rue_house ?
[00:01:51] <rue_house> you may have signal.h
[00:02:03] <anonnumberanon> Oh I do have io.h, which would explain why toggling ports STILL WORKED.
[00:02:18] <rue_house> look for signal.h
[00:02:27] <anonnumberanon> Now why wouldn't the compiler tell me interrupt.h could not be founnnndddd :(
[00:02:29] <anonnumberanon> I will.
[00:02:44] <anonnumberanon> signal.h
[00:02:45] <anonnumberanon> found
[00:02:57] <rue_house> yea that'll be the new method
[00:02:59] <anonnumberanon> Okay have I just become the victim of a huge troll.
[00:03:04] <rue_house> stand by, I'm searching code
[00:03:18] <rue_house> I told you, the method of interrupts changed
[00:04:51] <rue_house> clock/test6/rtc.c:ISR(TIMER2_OVF_vect) {
[00:05:43] <rue_house> ugh
[00:05:52] <anonnumberanon> Damn I don't want that (https://ccrma.stanford.edu/courses/250a-fall-2005/docs/avr-libc-user-manual-1.2.5/group__avr__interrupts.html) all my code is using interrupt.h
[00:06:15] <anonnumberanon> How come nobody meantioned it in #avr???
[00:06:32] <rue_house> they dont go back far enough
[00:06:46] <rue_house> just hold on
[00:06:59] <rue_house> I'v apparently not used an interrupt to flash an led in a LONG time
[00:07:06] <rue_house> whats your clock speed?
[00:07:09] <anonnumberanon> oh yeah i forgot, I was gonna read signal.h with great pain
[00:07:28] <anonnumberanon> 16mhz
[00:08:46] <rue_house> so, overflow a 16 bit counter with a clock divider of 16
[00:08:50] <rue_house> ... please stand by
[00:09:57] <rue_house> wtf, my new code uses interrupt.h
[00:10:19] <rue_house> what is your avr-libc version?
[00:10:58] <anonnumberanon> damn it must be old as shit then
[00:11:13] <rue_house> yea, about 2000
[00:12:09] <rue_house> did you compile it or get it as a system package?
[00:12:27] <anonnumberanon> 1.8.0 is my libc version
[00:12:34] <anonnumberanon> system package
[00:12:38] <rue_house> avr-libc?
[00:12:49] <anonnumberanon> correct
[00:15:24] <rue_house> hmm
[00:15:30] <rue_house> .. newer machine says...
[00:15:43] <anonnumberanon> This is the second time in a few days that a major package from my package manager I see is massively outdated. I cannot trust Debian again.
[00:16:01] <rue_house> wait
[00:16:03] <rue_house> for
[00:16:04] <rue_house> me
[00:16:05] <rue_house> to
[00:16:08] <anonnumberanon> We're back to the Windows mindset when you need to download and install the correct version every time you do something new.
[00:16:09] <rue_house> answer this
[00:16:13] <rue_house> just
[00:16:13] <rue_house> wait
[00:17:00] <rue_house> 1.8.0-2 is what I'm using
[00:17:17] <rue_house> /usr/lib/avr/include/avr/interrupt.h
[00:17:19] <rue_house> do you have it?
[00:17:27] <anonnumberanon> lol no
[00:17:37] <anonnumberanon> wait
[00:17:47] <rue_house> your sure? you didn't look by using locate without doing an updatedb ?
[00:18:36] * rue_house is sure he hears tom snickering in the background
[00:19:28] <anonnumberanon> found after updatedb: /usr/lib/avr/include/avr/interrupt.h
[00:19:34] <rue_house> yea
[00:19:39] <rue_house> remember to update the database
[00:19:47] <anonnumberanon> I do sometimes.
[00:20:08] <rue_house> ok, the interrupt defintion should look like
[00:20:21] <rue_house> ISR( BLA_vect) {
[06:15:48] <Tom_itx> rue, i thought signal was the old method
[09:23:52] <rue_house> did I get that wrong?
[09:24:04] <rue_house> I thought that was new source
[12:52:29] <Tom_itx> rue_house, just as i suspected..
[12:52:55] <Tom_L> #warning "This header file is obsolete. Use <avr/interrupt.h>."
[12:52:55] <Tom_L> #include <avr/interrupt.h>
[14:47:22] <anonnumberanon> Okay moving on..
[14:47:27] <anonnumberanon> http://www.avrfreaks.net/forum/precise-clock-cycle-delay-inline-asm
[14:48:53] <Tom_itx> did you get your tool chain fixed?
[14:49:14] <Tom_itx> interrupts won't work without interrupt.h
[14:49:30] <anonnumberanon> http://www.thegeekstuff.com/2013/04/c-macros-inline-functions/
[14:50:58] <Tom_itx> http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s5
[14:51:39] <Tom_itx> http://www.nongnu.org/avr-libc/user-manual/inline_asm.html
[14:52:04] <anonnumberanon> http://www.nongnu.org/avr-libc/user-manual/inline_asm.html
[14:52:06] <anonnumberanon> Yes Tom my toolchain is perfect now.
[14:53:55] <Tom_itx> getting interrupt driven blinky?
[14:53:59] <Tom_itx> http://www.avrfreaks.net/forum/tutsoft-traps-when-using-interrupts?name=PNphpBB2&file=viewtopic&t=55347
[14:54:32] <anonnumberanon> So hear this out it's kinda interesting. I was doing objcopy from a .o to a .hex instead of .elf to .hex
[14:55:02] <anonnumberanon> i thin file extensions dont really matter as long as the workflow is reapected
[14:56:00] <anonnumberanon> but then uploading a .o would still sometimes work on the macro. it was probably just not linked to interrupt.h
[15:01:18] <anonnumberanon> Tom so yeah I measure pwm with my oscilloscope. I benchmarked that some timers, some NOPs, different timing modes and prescalera. That's what I'm doing right now.
[16:28:46] <JT-Shop> printing a squarish part with PLA and the corners lift up as it prints, what causes that?
[16:29:53] <Snert_> #reprap might be a better place to ask that.
[16:30:52] <JT-Shop> I did but they are all busy chatting about other stuff
[16:46:28] <Snert_> https://www.google.com/#q=pla+corners+lift
[18:51:10] <anonnumberanon> man i missed the whole day's conversation due to smartphone battery dying and being in the bus for a long trip cna i get logs pls?
[18:57:42] <deshipu> nothing lost
[18:59:50] <anonnumberanon> per usual
[18:59:56] <anonnumberanon> AHH AHAHHHAA AA AAHHA
[19:00:03] <anonnumberanon> yeah okay I'm a bit exhausted
[19:00:38] <anonnumberanon> You mean noone mentioned something about really strong, durable, torquy and cheap servos ?
[19:00:40] <anonnumberanon> :(
[19:01:24] <JT-Shop> zlog
[19:01:37] <JT-Shop> oh I see tom had a logger here
[19:05:32] <anonnumberanon> lol that convo is hilarious
[19:05:45] <anonnumberanon> when I thought I didn't have interrupt.h
[19:05:56] <anonnumberanon> I was blaming Debian.
[21:22:20] <Tom_L> anonnumberanon you running windows or linux?
[21:23:40] <Tom_L> http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx
[21:23:48] <Tom_L> the linux link is there also
[21:57:05] <anonnumberanon> Tom_L, I run both. I dev on Linux exclusively.
[21:58:22] <Tom_L> those should be the latest toolchains
[21:58:53] <orlock> Hmm
[21:59:14] <orlock> Does anybody have any suggestions for how to calculate a quadrature encoder offset?
[21:59:43] <orlock> I know it needs to be mpunted 90 degrees out of phase
[22:00:00] <Tom_L> orlock, http://tom-itx.no-ip.biz:81/~webpage/avr/atmega328/PCINT0/quadrature/
[22:00:03] <orlock> so i've got 360 slots per rotation
[22:00:29] <orlock> Tom_L: i'm talking getting the encoder at the 90 degrees part
[22:00:35] <orlock> and
[22:00:36] <orlock> tom-itx.no-ip.biz refused to connect.
[22:00:46] <orlock> that might be the proxy here
[22:00:55] <Tom_L> probably
[22:01:59] <Tom_L> takes 2 interrupts
[22:02:06] <Tom_L> to get full quadrature
[22:02:26] <orlock> it seems that if i have 36 encoders, so 10 degrees per slot, i should be some multiple of 10 degrees plus 2.5?
[22:03:53] <Tom_L> the slots are read such that either rising or falling edge will be read 90 deg out of phase with the other channel
[22:04:10] <orlock> Yup.
[22:04:40] <Tom_L> ^^ that code does that
[22:05:00] <orlock> But the sensor needs to be at the right physical position
[22:05:25] <orlock> Does it calculate the rotational offset for the sensor? (i cant see the code..)
[22:16:24] <Tom_L> hold on
[22:17:32] <Tom_L> http://paste.ubuntu.com/23315827/
[22:18:37] <Tom_L> that was for a 328
[22:20:03] <Tom_L> no
[22:20:14] <Tom_L> that should be built in the sensor
[22:20:46] <orlock> Ok, theres the issue
[22:20:48] <orlock> I'm using a pair of standard optical sensors
[22:20:55] <orlock> and a printed wheel
[22:21:17] <Tom_L> it may be difficult to set them but you should be able to
[22:21:28] <Tom_L> watch it on a scope or such to get the phase correct
[22:40:22] <orlock> hah
[23:47:57] <rue_house> back from work