#avr Logs

Apr 27 2018

#avr Calendar

12:57 AM rue_mohr: so if I have two optical sensors that give me sine wave votlages that are 90 degrees apart
01:00 AM rue_mohr: how can I use the vector length to know what the zero levels are?
01:10 AM rue_bed: I suppose you have to know that the two signals are the same range
01:31 AM thardin: why would you need to know that?
01:31 AM thardin: or: just look at them in xy mode on a scope
01:31 AM nuxil: i dont get the question.
01:32 AM rue_bed: well, if the signal is comming from optical sensors that I want to do realtime adjustments wtih
01:32 AM rue_bed: to normalize the signal
01:33 AM rue_bed: I'm interested in some resolver ideas
01:33 AM rue_bed: one is optical, the other is magnetic
01:35 AM nuxil: humm. your sensor it gives off a sine wave? you ment its analoge ?
01:36 AM nuxil: or does it give off a pur sine wave
01:36 AM rue_bed: analog, gives off sin and cos
01:36 AM rue_bed: you work out the angle
01:37 AM polprog: interesting, never seen one like that. what sensor is it? part no.?
01:38 AM Thrashbarg: rue_bed: what do you mean zero levels, when the signal crosses 0V?
01:38 AM thardin: I think they mean the origin around which the signal rotates
01:38 AM thardin: you can use some math to figure that out
01:39 AM nuxil: Pi/2
01:39 AM thardin: I presume you have some DC offset on them?
01:39 AM thardin: and that they never cross zero?
01:39 AM thardin: stupid simple way is to just run them for a while and compute an average
01:40 AM Haohmaru: wut r u computing
01:40 AM polprog: if its analogue then you just remove the DC offset with a cap, i think
01:40 AM polprog: takes less memory
01:40 AM Haohmaru: you mean a highpass filter
01:40 AM Thrashbarg: rue_bed is leaving us iin suspense lol
01:41 AM Haohmaru: polprog >:/
01:41 AM Haohmaru: he probably fell asleep
01:41 AM Thrashbarg: yeah
01:41 AM * Haohmaru kicks rue out of the bed
01:41 AM polprog: Haohmaru: ac coupling with fitting RC constant
01:41 AM polprog: maybe he just walks from his bedroom to his workshop, give him a sec
01:41 AM polprog: :p
01:42 AM Haohmaru: tick tick, DING
01:42 AM Haohmaru: a sec passed
01:42 AM Casper: Haohmaru: kick him out of the bed and in his grave?
01:42 AM Haohmaru: but then how will we torture him?
01:42 AM Casper: by slowly dropping dirt in?
01:43 AM Haohmaru: that's not cruel enough
01:43 AM Casper: what about... mud?
01:43 AM Haohmaru: same
01:43 AM polprog: we will install studio 7 on his PC
01:43 AM nuxil: we cant be so evil :p
01:43 AM Haohmaru: lets throw away all his arm cortex chips
01:44 AM Casper: hmmm ok, let's just remove his backspace key and his delete key then...
01:44 AM Haohmaru: that too
01:44 AM polprog: there is always ^H and ^W
01:45 AM Haohmaru: rotate the pcb in his mouse
01:45 AM Casper: he'll just hold the mouse upside down
01:45 AM Haohmaru: he can't do that in his bed, can he? >:)
01:46 AM polprog: rue_bed: what kind of sensor is it? im curious
01:46 AM Casper: oh I know! let's just release a few healthy crickets in his house
01:47 AM Haohmaru: mmm
01:47 AM Haohmaru: that's more like it
01:48 AM Casper: now, what about configuring his keyboard in azerty?
01:49 AM Casper: better yet! install a program that actually change the keyboard layout every 15 minutes
01:49 AM Haohmaru: a modified driver, which introduces random typos
01:50 AM Haohmaru: and randomly pretends that the space bar wasn't pressed
01:50 AM Casper: autocorrector
01:50 AM Haohmaru: sohelltypelikethis
01:51 AM nuxil: start a text2speach daemon in background linking it to keystrokes.
01:51 AM Casper: hehe
01:51 AM Casper: like cortana at windows install time...
01:51 AM nuxil: :)
01:52 AM Casper: thay fricking bitch today decided to skip steps
01:52 AM Casper: location: grece
01:52 AM Casper: keyboard: canadian multilangue <=== WRONG
01:53 AM nuxil: hmm my idea is a virus i like to see in a open office landscape :D
01:53 AM nuxil: that be epic :p
01:53 AM Casper: stupid microsoft and their braindead engineers that still hasn't learned that in quebec we use french canadian, not any other ones....
01:54 AM Casper: or a virus that listen to what you say, and open an amazon page with whatever you talk about
01:54 AM Casper: or a wikipedia page
01:54 AM Casper: man that would be annoying!
01:54 AM nuxil: facebook kind of already does that if you got a it on your phone.
01:54 AM Casper: and for the rest? there is always bing!
01:55 AM Casper: nuxil: that has been proven to be false
01:55 AM Casper: it do not have the mic access
01:56 AM nuxil: idk. i dont got messanger on my phone. but access to mic it must have sice you can call., but i heard people say that they taked about this and that. and then get ads about the stuff they where talking about.
01:57 AM nuxil: but i dont really care. dont use messanger
01:58 AM Casper: of course, because facebook have a profile of what you like, thru what you would possibly talk about
01:58 AM nuxil: *messenger
01:58 AM Casper: so once in a while it will happend
01:59 AM nuxil: i just get elecronics ads from banggood/amazon/ebay etc when i open FB :p
01:59 AM nuxil: *tonz of it too
01:59 AM nuxil: on my PC
02:04 AM Casper: the problem is that even if you do not have a facebook account, it still track you everywhere
02:04 AM Casper: and facebook is everywhere!
02:05 AM Thrashbarg: faecebook
02:06 AM Casper: fecesbook...
02:06 AM thardin: poopboo-k
02:06 AM Casper: I went to download some drivers from asus today... surprice! facebook is one of the domains it connect to
02:07 AM Casper: 7x asus domains + 1x facebook
02:15 AM thardin: I block all js and third party domains by default. leads to a very broken web sadly
02:15 AM thardin: but on the other hand when I find sites made by people who don't rely on that stuff, it's a treat
02:38 AM Haohmaru: facepuke
02:53 AM polprog: Disconnect is pretty good for that
02:54 AM polprog: NoScript not really since every braindead webdev implements bullshit JS that is crucial for displaying the content
03:18 AM Haohmaru: disconnect?
03:20 AM polprog: https://addons.mozilla.org/en-US/firefox/addon/disconnect/
03:30 AM nohitzzzz: nuxil waht was your pirnter model?
03:34 AM nuxil: tevo tarantula.
03:38 AM nuxil: not worth getting unless you like to fiddle around some and learn how 3d printers are built and works.
03:45 AM Haohmaru: polprog that looks like another adblock crap
03:45 AM nuxil: i took mine all apart. mounted a new Y rail for it :) https://gyazo.com/94ccdf0825d586e0dd43d5d4a1978dfd
03:46 AM nuxil: made a box for it to hide the electronics. and i have started assembeling it again :) https://gyazo.com/970a6b64aa7092db21c41d15f691edda
03:46 AM nuxil: still a bit left tho. :p
04:08 AM nuxil: nohitzzzz, are you thinking about getting a 3d printer?
04:10 AM nohitzzzz: at some point yes
04:42 AM polprog: Haohmaru: but its better
04:42 AM polprog: i have 3 adblocks total
04:48 AM nohitzzzz: but i have other more important things to buy first
04:48 AM nohitzzzz: to my new lab
04:52 AM Haohmaru: polprog sure, and how does it work? with white/black lists?
04:59 AM polprog: i think it bans blacklisted js scripts
04:59 AM Haohmaru: grrrrreat
06:20 AM Haohmaru: do { ... size--; } while (size);
06:21 AM Haohmaru: x_x
06:21 AM Haohmaru: that's unthinkable
06:36 AM polprog: while (size-->limit){ }
06:36 AM Haohmaru: eh?
06:36 AM Haohmaru: polprog r u sober
06:36 AM polprog: what?
06:37 AM polprog: i cant hear you
06:37 AM Haohmaru: what kind of language is that
06:37 AM polprog: thats C
06:37 AM Haohmaru: no it ain't
06:37 AM Haohmaru: ;P~
06:37 AM polprog: ;p
06:37 AM JanC is now known as Guest28882
06:37 AM JanC_ is now known as JanC
06:37 AM Haohmaru: the compiler's gonna output "lolwat"
06:38 AM polprog: you can also make a couple of line breaks and make the arrow go down with \
06:38 AM polprog: :P
06:39 AM Haohmaru: wut is this, C or ascii art
06:39 AM Haohmaru: which reminds me of..
06:41 AM Haohmaru: ugh, it's gone
06:47 AM nuxil: ٩(̾●̮̮̃̾•̃̾)۶
06:50 AM nuxil: Haohmaru, mix c with ascii art, makes it so easy to read the code :p
06:50 AM nuxil: https://qph.fs.quoracdn.net/main-qimg-d6b1dd3a19bbb29f7b991f9010a6b179
06:50 AM nuxil: :D
06:51 AM Haohmaru: i was looking for fish.c
06:51 AM Haohmaru: from musicdsp
06:51 AM nuxil: oh.. donut.c not good enuf :p
06:52 AM nuxil: *dougnut.c
06:52 AM polprog: lol nuxil
08:15 AM Haohmaru: fugg, how do i check dafuq is taking so much flash space in my program?!
08:17 AM Haohmaru: and i use -Os even
08:20 AM polprog: de com pile
08:20 AM polprog: \o/
08:20 AM polprog: maybe printf or some other standard library functions
08:20 AM polprog: maybe float handling routines
08:21 AM polprog: how much size is it?
08:26 AM Haohmaru: 8KB
08:33 AM polprog: woah
08:33 AM Haohmaru: yeah, and it's a bootloader
08:34 AM Haohmaru: so 8KB is the absolute maximum, i've not yet written the actual flashing algorithm x_x
08:35 AM polprog: holy crap
08:35 AM polprog: 8 kib bootloader?
08:35 AM polprog: what are you decrypting the payload or what?
08:35 AM polprog: rsa encrypted flash image?
08:36 AM MrFahrenheit: neat https://youtu.be/Rh0pYtQG5wI?t=520
08:37 AM Haohmaru: it's basically a copy of my firmware, with lots of stuff removed, but i keep some of the debug printf(), some pin initialization, USART, UART, a timer, and the custom communication protocol (only with a minimal set of messages/commands)
08:38 AM polprog: thats neat
08:38 AM Haohmaru: i swtiched to smaller printf() (-Wl,-u,vfprintf -lprintf_min) and barely reduced it to 7K
08:39 AM Haohmaru: 7660 bytes precisely x_x
08:41 AM Haohmaru: hm, my USART-related functions are fancy and include an algorithm to find the optimal settings for a given bitrate, and a function to calculate the effective bitrate from the given settings, these involve funky maths with potentially big integers
08:43 AM Haohmaru: yeah, 32bit codez there
08:43 AM Haohmaru: i think i should try to rewrite that stuff with template metashizzle
08:44 AM polprog: why the heck do you need all of that in a bootloader
08:44 AM polprog: the only job of the bootloader is to flash stuff
08:45 AM Haohmaru: i use those fancy things in the firmware, i've written it loooong ago
08:45 AM MrFahrenheit: <Haohmaru> fugg, how do i check dafuq is taking so much flash space in my program?!
08:45 AM MrFahrenheit: <Haohmaru> i think i should try to rewrite that stuff with template metashizzle
08:45 AM MrFahrenheit: hmm
08:45 AM Haohmaru: wut?
08:46 AM MrFahrenheit: templates are known to cause enormous binary boat
08:46 AM Haohmaru: MrFahrenheit then those fugly math calculations will happen at compile time and produce simple constants
08:46 AM MrFahrenheit: try constexpr instead
08:47 AM Haohmaru: a 235290 integer constant vs a whole bunch of math computations that return that same integer
08:47 AM Haohmaru: how?
08:50 AM McDonaldsWiFi: you guys ever looked at the quark-85 project?
08:50 AM McDonaldsWiFi: super freaking neat
08:50 AM Haohmaru: http://paste.debian.net/hidden/114492fa/
08:50 AM rue_: oop causes lots of bloat too
08:51 AM Haohmaru: how can i "measure" or "see" where the "bloat" comes from?
08:52 AM Haohmaru: btw, you finally crawled out of bed
08:52 AM Haohmaru: or did you fall ;P~
08:55 AM MrFahrenheit: Haohmaru, maybe generate an asm listing and look through it
08:56 AM Haohmaru: i am
08:56 AM Haohmaru: but it's full of stuffz x_x
08:56 AM Haohmaru: it's 207KB
08:56 AM MrFahrenheit: also, gcc can generate a listing
08:57 AM Haohmaru: what kind?
08:57 AM MrFahrenheit: -Wl,-Map=listing.map
08:57 AM Haohmaru: i got that
08:58 AM Haohmaru: and again, it's full of stuff, some stuff there is familiar, some isn't, but what do i look for?
08:58 AM MrFahrenheit: large objects
08:59 AM MrFahrenheit: try this too https://stackoverflow.com/questions/6668775/how-to-list-the-size-of-static-declarations-in-object-file/6669917#6669917
09:00 AM Haohmaru: nm on objects?
09:01 AM Haohmaru: but afaik not *everything* from an object gets included in the binary, or am i wrong?
09:05 AM Haohmaru: 0002183a 00000282 T vfprintf
09:05 AM Haohmaru: 0002140e 000002d4 T main
09:05 AM Haohmaru: 00020cf6 00000374 T _Z10poll_commsv
09:06 AM Haohmaru: rrrright, so those are the top 3
09:06 AM Haohmaru: :/
09:09 AM nn7: Howdy. I've been programming AVRs for some years and always used an avrispmkii. I'm interested in getting into JTAG. I've spent a few hours searching and I'm having trouble figuring out which Atmel JTAG programmers are current and which are considered obsolete.
09:10 AM nn7: There's a JTAGICE and a JTAGICEmkII and an AVRONE...
09:10 AM nn7: One page says the JTAGICEmkII is the newest, another said it's obsolete.
09:10 AM twnqx: there's also a mkiii
09:11 AM nn7: I haven't even found that one
09:11 AM twnqx: mh
09:12 AM twnqx: it disappeared from the shop i saw it last. blame microchip.
09:12 AM nn7: The Microchip programmers page is down :/
09:12 AM twnqx: (it was called jtag ice3)
09:13 AM nn7: *was*? Is it discontinued?
09:13 AM twnqx: well, it's not available from any shop
09:13 AM twnqx: like i said, blame microchip
09:13 AM nn7: so what do I buy?
09:13 AM twnqx: maybe decided "we'll continue making AVR chips, just not the tools needed"
09:14 AM twnqx: http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATJTAGICE3
09:14 AM twnqx: well, yes, discontinued.
09:14 AM nn7: ack, Digikey has an AVRONE for a mere $630
09:16 AM twnqx: i am using an annoyingly slow mk1 clone
09:16 AM nn7: Mouser has an atmel-ice for $130
09:17 AM polprog: you can get a used dragon for a good price i think
09:21 AM twnqx: yeah, looks like atmel-ice is the current one that could do all atmel chips
09:25 AM nn7: ok thanks
09:29 AM nohitzzzz: does dragon do jtag?
09:30 AM Casper: I find it sad that the dragon is not covered in flames, or atleast red...
09:30 AM nohitzzzz: those atmel tools are ridiculous
09:38 AM Casper: why?
09:38 AM twnqx: they run on a gaming HAL, not an operating system :P
09:40 AM twnqx: i'll take that back.
09:40 AM twnqx: they run on spyware pretending to be a gaming HAL.
09:51 AM Casper: ???
10:49 AM nohitzzzz: why? i dont think its very smart to rip-off your own customers
10:50 AM polprog: https://www.youtube.com/watch?v=VZ8z-t2ejnY oh nostalgia
10:50 AM nohitzzzz: this is atmel ice https://media.digikey.com/Photos/Atmel%20Photos/MFG_ATATMEL-ICE-PCBA.jpg why does it cost 130e
10:50 AM nohitzzzz: those parts cost like 5 bucks
10:55 AM z99: hello are you around toml?
10:55 AM z99: anybody knows how to add a file to the library in amtel 7?
10:57 AM nohitzzzz: add file to the library? what do you mean
10:58 AM z99: i wrote a code and it is not recognizing an #include file. i got the file from internet and dl it but do not know how to add it into the software so it would recognize the code
10:58 AM z99: you get me?
11:00 AM polprog: you probably want to add file to a project
11:02 AM nohitzzzz: yeah right click the project folder(not solution) in the project view and "Add new item"
11:04 AM nohitzzzz: or actually "Add existing item"
11:11 AM z99: ook thanks
11:23 AM z99: again
11:23 AM z99: i added the .h file in the project older
11:24 AM z99: now i am looking for add library again
12:48 PM z99: this is my code for the project.
12:48 PM z99: https://pastebin.com/bS5Z1UkY
12:49 PM z99: my problem right now that it is not recognizing that liquidcrystal.h is in the library. help!!!!!!!
12:51 PM antto: where's that file located?
12:52 PM z99: i put it in the project folder
12:52 PM antto: oh wait, this is arduino
12:52 PM z99: yes
12:52 PM polprog: wait are you using arduino ide or atmel studio
12:52 PM antto: then IMO it should be "filename.h" instead of <filename.h>
12:52 PM z99: arduino uno
12:52 PM antto: try that
12:52 PM z99: ok
12:52 PM polprog: yeah that should do
12:54 PM z99: everything in c should be "filename.h"?
12:54 PM nohitzzzz: this is atmel studio 7 with arduino project import?
12:55 PM z99: yes
12:55 PM nohitzzzz: you need to set up the include path in the project settings
12:56 PM nohitzzzz: to that path where you .h file resides
12:57 PM z99: i did that
12:57 PM z99: i thought i did that. browse and select the file. still doesnt recognize it
12:57 PM z99: and i tried to change it to"" and it still doesnt recognize it
12:57 PM z99: i'll try again
12:58 PM nohitzzzz: properties->toolchain->avr/gnu c compiler->directories
01:00 PM z99: where is properties?
01:02 PM nohitzzzz: right click the project folder in project view
01:03 PM nohitzzzz: its the last one on the menu
01:05 PM z99: that must be for previous version nohitzzzz when i right click i do not get tool chain option
01:06 PM nohitzzzz: Properties-Toolchain
01:06 PM nohitzzzz: ->
01:07 PM z99: i do not see toolchain
01:07 PM z99: i click on properties
01:07 PM z99: let me screen shot what i see
01:09 PM antto: z99 what's the exact error message?
01:09 PM nohitzzzz: https://s31.postimg.cc/abxb64vwr/toolchain.png
01:09 PM z99: https://imgur.com/a/03hnNvq
01:10 PM z99: https://imgur.com/a/7TqtLCF
01:10 PM nohitzzzz: dont right click the solution but the project
01:11 PM antto: i see a makefile
01:11 PM nohitzzzz: the one with that yellow icon
01:11 PM antto: => i run away
01:13 PM z99: what does make file mean?
01:13 PM antto: :~(
01:13 PM antto: where are all the makefile fanbois now
01:13 PM z99: https://imgur.com/a/sK3RJee
01:14 PM z99: i dont know what you mean
01:14 PM z99: can i make this code work?
01:14 PM nohitzzzz: wait a sec
01:15 PM nohitzzzz: https://s31.postimg.cc/apyn5sl63/toolchain.png
01:20 PM z99: thank you nohitz
01:20 PM z99: i seee it now
01:20 PM z99: i will go back to your previous instructions
01:22 PM z99: ok
01:25 PM nohitzzzz: uncheck the relative path and find the folder where your .h file is
01:26 PM z99: thank you solve liquidcrystal.h problem
01:27 PM z99: no i have print.h problem
01:27 PM z99: now
01:27 PM z99: where can i find the file print.h how can i google that file to dl
01:31 PM z99: any ideas how to fix the 2nd error as well?
01:35 PM z99: nohitzzz
01:36 PM nohitzzzz: not really
01:36 PM nohitzzzz: it uses autogenereted makefile so there shouldnt be any problems
01:37 PM nohitzzzz: try re-building the project
01:38 PM z99: it is asking for print.h now
01:38 PM z99: i do not have that one
01:38 PM z99: do you know where i can find it or search for it online
01:40 PM nohitzzzz: no idea
01:42 PM nohitzzzz: i dont know specifics about your project, i have no idea what "print.h" is
01:46 PM z99: ok
02:30 PM z99: https://imgur.com/a/obTdKSK
02:30 PM z99: how can i resolve these errors?
02:36 PM z99: brb
03:27 PM * nuxil sips some coffee
03:31 PM nuxil: so, i finally got use for my c++ book :p
04:36 PM nuxil: i was watching https://www.youtube.com/watch?v=ONXfL6evR0Q . omg this gnome shell is awefull.
04:42 PM MrFahrenheit: I've been using gnome 3 for like 4 years now
04:43 PM MrFahrenheit: also, what's your use for the book?
04:43 PM nuxil: i got xfce on my lappy
04:45 PM nuxil: https://gyazo.com/727f1a5944998e70f322ef3279e88fd2 :p
04:45 PM nuxil: needed some extra height on one side while wireing :p
04:46 PM MrFahrenheit: :P
04:56 PM nuxil: xfce feels more like a desktop to what i used to. gnome-shell is just to weird for me.
04:57 PM nuxil: same with kde. i used to like it. kde 3.x series. but when they started with this plasma crap or what is was called i started using xfce.
08:13 PM lvlinux: nuxil: enlightenment WM!
08:22 PM learath: lies.
11:51 PM day__ is now known as day