#avr Logs

Nov 01 2017

#avr Calendar

01:14 AM day__ is now known as daey
01:56 AM Emil: Casper: lolwat no
01:56 AM Emil: Only space requirements would increase
01:57 AM Emil: Casper: because it is an 8 bit platform with no hw floay
01:57 AM Emil: Everything is already in code
01:57 AM Casper: no, but there is 3 16 bits registers
01:58 AM Emil: Ameisen: 16/24 bit float would be great
01:58 AM Emil: Casper: yes? so?
01:59 AM Casper: yes would be nice, but very non-standard...
02:00 AM Emil: Irrelevant :D
04:16 AM deadk is now known as e
04:45 AM nuxil: mornings.
04:46 AM nuxil: a new day to try to get some usefull knowledge into my thick skull.
04:47 AM nuxil: Hei Emil, are you around.?
04:59 AM Emil: hm?
04:59 AM Emil: yeah
04:59 AM Emil: nuxil: sup?
05:00 AM Emil: polprog: do you have video of that https://puu.sh/ybQl0/469afe1895.jpg
05:00 AM nuxil: You said last night that i should look into fast pwm where i use COM0B as output and just adjust the frequency adjusting OCR0A.
05:01 AM nuxil: but will i be able to adjust the freq in the range.,. lets say 10hz to 100kh using this method ?
05:06 AM Emil: nuxil: yes
05:06 AM Emil: but you need to keep in mind that your resolution might suffer
05:06 AM Emil: for the duty cycle
05:08 AM nuxil: well aslong as i can do atleast 25% steps in the duty cycle its good enough for me. i dont need huge resolution.
05:08 AM Emil: wellthen
05:08 AM Emil: it works just fine :)
05:09 AM Emil: you get loads more resolution, too
05:09 AM nuxil: ok. thanks. time go go read this manual again :p
05:10 AM Emil: the resolution is (1/256)*100% down to 62,5kHz, after which it decreases because your clock speed is too slow
05:11 AM Emil: sorry, 31250Hz
05:12 AM Emil: after which it decreases and at 100kHz you have (1/80)*100% steps
05:12 AM nuxil: more than what i need :D
05:13 AM Emil: hmm
05:13 AM Emil: wait
05:13 AM Emil: sorry I'm wrong
05:13 AM nuxil: you are ?
05:13 AM Emil: My calculations don't take into account changing the freq
05:13 AM Emil: anycase
05:13 AM Emil: you still have loads more resolution than 25%
05:14 AM nuxil: :)
05:15 AM Emil: You probably need to adjust the prescaler, too
05:15 AM Emil: to get the required range with best resolution
05:16 AM Emil: s/probably/also
07:17 AM polprog: morning
07:24 AM noHitW_work: morning
07:38 AM Emil: polprog: morning?
07:38 AM Emil: Well you slept well ;)
08:15 AM polprog: Emil: holiday today
08:16 AM polprog: :D
08:17 AM polprog: Emil: that science fair? my friend took pics but he only filmed the scope when i threw some lissajous patterns and demos on it
08:21 AM Emil: ah
08:21 AM Emil: too bad
08:22 AM polprog: im looking for a power strip that has both eu sockets and IEC sockets
08:22 AM Emil: lolwat
08:23 AM Emil: why
08:23 AM Emil: No such thing probably
08:23 AM Emil: Unless you pay out of your ass for it
08:27 AM polprog: http://www.internationalconfig.com/prod_shot/61460.jpg
08:28 AM polprog: nobody stocks those in pl
08:29 AM polprog: found it. 100 gold :P http://netia.emarket.pl/listwy-zabezpieczaj%C4%85ce/digitus-aluminiowa-listwa-zasilaj%C4%85ca-iec-c13-digitus-10-gniazd-dn-95404/p-c0362859
08:48 AM Emil: fuuck
08:48 AM Emil: The holster I bought does not cover the front sight of the gun
08:48 AM Emil: gooood damn it
08:48 AM Emil: nais :D
09:27 AM nuxil: so the more i try to understand this tiny85 the more confused i get. its like falling down a deep rabbit hole.
09:27 AM nuxil: i got my squar wave get working somewhat with some simple code. but there is a issue.
09:28 AM nuxil: if i set the dutycycle to example 50%. then adjust the freq pot it messes up the duty cycle.
09:29 AM nuxil: Emil, you mention something about this and i needed to update OCR0B or something each time i updated OCR0A
09:32 AM nuxil: my scroll history is out of range..
09:32 AM * nuxil goes to look for the chatlog file
09:35 AM nuxil: hmm. "Now you have an issue if OCR0A<OCR0B" i guess this is what im seeing.
09:38 AM nuxil: also you said. so every time you update OCR0A you should also update OCR0B .what does this mean ?
09:57 AM Emil: exactly whay I said
09:57 AM Emil: nuxil: you need to update both to avoid issues and glitches
09:57 AM Emil: you also need to play with the prescalers
10:00 AM nuxil: so lets say i got OCR0A = 0x7f, and OCR0B = 0x40, some freq with 50 % duty cycle.
10:01 AM nuxil: then i set OCR0A to 0x9F. does this mean i have to do the delta? to keep the 50% duty?
10:01 AM nuxil: something like
10:01 AM nuxil: current_dudty = (OCR0A / OCR0B) * 100 "get % of current duty"
10:01 AM nuxil: new_duty = (OCR0A / 100) * current_dudty "adjust the new duty %"
10:01 AM nuxil: then set OCROB to the new duty ?
10:02 AM Emil: don't use hex
10:02 AM Emil: it's annoying as fuck
10:02 AM nuxil: sorry :p
10:03 AM Emil: yeah
10:03 AM Emil: you got the gist of it
10:03 AM Emil: you must adjust both to retain the dutycycle
10:03 AM nuxil: ok. thanks.
10:49 AM enh: Hi
12:16 PM Emil: Hiii
12:57 PM nuxil: so. progress and setbacks.
12:57 PM nuxil: using these potmeters of bad quality makes this thing jump all over the place
12:59 PM nuxil: so. potmeters for adjusting the freq and dudy cycle is out of the question unless i invest 50bucks in high precision ones. :\
12:59 PM nuxil: Emil, digital rotary switches.. do i have enuf to go on ?
12:59 PM Emil: mate
12:59 PM nuxil: is this possible
12:59 PM Emil: nuxil: stop
12:59 PM nuxil: https://gyazo.com/6f0cc629c95bcc5babe64a6911873b28
12:59 PM Emil: nuxil: just add filtering
01:00 PM Emil: either hardware or software
01:00 PM Emil: both are easy
01:00 PM Emil: hardware is cheap and free
01:00 PM nuxil: Emil, these pots arent good. verry cheap ones.
01:00 PM nuxil: 25% tollerance
01:01 PM nuxil: made in china ofc :p
01:01 PM Emil: https://emil.fi/jako/kuvat/2017-11-01_19-30-22_TKt8EgHN.png
01:02 PM cehteh: 25% tolerance overall or in linearity?
01:02 PM Emil: nuxil: most potentiometers are very noise when turned
01:02 PM Emil: you must filter the values
01:02 PM cehteh: yes
01:02 PM cehteh: why analog btw? how about rotary encoder?
01:02 PM nuxil: cehteh, overall
01:03 PM cehteh: overall tolerance shouldnt affect a proper design that much
01:03 PM Emil: cehteh: rotary encoders are slooow
01:03 PM Emil: and annnoying
01:04 PM cehteh: for what? i mean you can handle speed properly depending on the usage
01:05 PM cehteh: when you want to change a wider value range you can program in some acceleration factor (counting exponentially faster, the more/faster you turn it in one direction)
01:06 PM nuxil: these pots are all over the place. example. it goes fine upto 10k then does a jump of 2k by minimal touch then slow then huge again. really bad when trying to set a fixed freq :p
01:06 PM Emil: nuxil:
01:06 PM Emil: mate
01:06 PM Emil: that's because they are noisy
01:06 PM Emil: add the fucking filtering
01:06 PM Emil: Either code lowpass
01:07 PM Emil: value=(7*value)/8+newvalue/8;
01:07 PM Emil: or by adding the capacitor filtering from above
01:07 PM cehteh: and/or first hardware RC filtering
01:07 PM Emil: yeah
01:07 PM Emil: I highly recommend the hardware solution
01:07 PM cehteh: prolly both
01:08 PM cehteh: how do you connect them in the circuit?
01:08 PM cehteh: anyway, i'd prefer an encoder
01:09 PM Emil: the software one is for when you can't change the hardware
01:09 PM cehteh: i'd filtering in both ways, hardware for the high freq noise, software for low freq noise and calibration
01:11 PM cehteh: you may even add some more elaborate stuff, like waiting a few ms for a value to settle, compensate very slow drift and so on
01:11 PM Emil: true
01:12 PM cehteh: but as all filtering it gives a little latency, do do as little as possible that there is no human noticeable lag
01:13 PM cehteh: still .. rotary encoder might be preferable
01:27 PM bss36504: Anybody ever used any of the Atmel Wifi offerings?
01:30 PM bss36504: I'll take that as a no...
01:35 PM bss36504: It's odd that they only offer one ARM-based Wifi module. The WILC and WINC family devices use some Cortus processor.
01:35 PM bss36504: I would have been less surprised if they used an AVR32 honestly.
01:35 PM bss36504: But the ARM module is stupidly shaped and really big compared to the WILC and WINC modules...
01:36 PM bss36504: Also much more difficult to solder since it doesnt have castellated pads
03:01 PM Emil: hmm
03:01 PM Emil: I'm super fucking disappointed that we don't have a low cost wifi module other than esp8266
03:03 PM LeoNerd: It is upsetting, yes
03:17 PM Ameisen: hmmm
03:17 PM Ameisen: if I'm building a custom board... should I put an atmel on it, or a cortex-m0
03:39 PM Emil: Ameisen: arm of course
03:40 PM Emil: Pretty much the only reason to use AVRs is because of their ease and speed of development
03:40 PM Emil: and debugging
03:40 PM Emil: and determinism
03:40 PM Emil: ARMs are better hardware wise in pretty much every way
03:40 PM Emil: but development is cancer
03:44 PM mmfood: whats your experience with sn96.5 ag3.0 Cu0.5 lead-free solder?
03:45 PM LeoNerd: I have some leadfree, but I don't offhand recall what its composition is
03:45 PM LeoNerd: Mine seems decent enough though
03:45 PM LeoNerd: Tastes nicer than the leaded stuff anyway ;)
03:45 PM mmfood: ok
03:45 PM mmfood: is it from sparkfun perhaps?
03:46 PM LeoNerd: Nope. Generic amazon
03:47 PM mmfood: ok
03:49 PM twnqx: isn't the smell from the flux core anyway?
04:19 PM bss36504: Emil: I'm just annoyed I can't find a concise tutorial for bare-metal programming the ESP8266 w/out using an arduino or the arduino IDE in any capacity.
04:19 PM bss36504: I found a Hackaday post that gives a high level view and some decent resources to look into, but I need to follow up.
04:20 PM bss36504: Maybe I'll be the first guy to show how to make a "Webpage controlled LED - Bare metal ESP8266" tutorial...
04:20 PM ohsix: eh
04:20 PM ohsix: cnlohr did it
04:21 PM Emil: bss36504: hm?
04:21 PM Emil: bss36504: the SDK and tutorials should be pretty easily available
04:21 PM bss36504: Well then maybe I'm just dumb.
04:21 PM Emil: bss36504: but, do make emil.fi/avr but for esp8266 ;)
04:21 PM Emil: I'll buy you a beer if you do
04:21 PM Emil: because I'm dying to switch away from this arduino shit
04:22 PM bss36504: haha alright
04:22 PM Emil: too
04:22 PM bss36504: Yeah it's just irritating that any time something low cost comes out it just gets trampled by ardu-weeny nerds.
04:22 PM bss36504: Like, what if I want to sell something (for cheap) but have a more "professional" dev environment.
04:23 PM bss36504: I can't be the first person who wants this.
04:23 PM bss36504: So I got a new job
04:23 PM bss36504: I'm all in that IAR compiler now.
04:24 PM bss36504: The IDE is garbage but the code generation is quite nice. Im trying to test out the Eclipse integration from IAR, because their debugging tools are super fucking useful
04:24 PM Emil: bss36504: noooo
04:24 PM Emil: get the fuck away from IAR
04:24 PM Emil: >eclipse
04:24 PM Emil: bss36504:
04:24 PM Emil: mate
04:24 PM bss36504: Nah man, it's cool when you aren't personally paying for it
04:24 PM Emil: you are a lost cause
04:24 PM Emil: :D
04:24 PM bss36504: Trust me, eclipse is better than IAR EmbeddedWorkbench
04:24 PM polprog: Eclipse for avr is not bad
04:24 PM bss36504: Like, a thousand times better
04:24 PM Emil: oh I 100% agree that IAR WorkBench should burn
04:24 PM bss36504: At least eclipse can actually index code properly
04:25 PM polprog: ^^
04:25 PM polprog: and git integration
04:25 PM Emil: and Eclipse works
04:25 PM polprog: <3
04:25 PM Emil: but eclipse is shiiiite
04:25 PM Emil: polprog: et tu, brute!?
04:25 PM polprog: sorry, emacs/vim gives up on big projects
04:25 PM bss36504: Nah, Oxygen so far has been good
04:25 PM Emil: polprog: stop
04:25 PM bss36504: (Eclipse Oxygen that is)
04:25 PM Emil: polprog: you were the chosen one!
04:25 PM polprog: kek
04:26 PM polprog: bss36504: I like the new oxygen too
04:26 PM bss36504: Seriously though, IAR with a J-Link is pretty boss. Super cool timeline trace features, interrupt tracking etc.
04:28 PM Emil: bss36504: write emil.fi/avr for your favourite arm
04:28 PM Emil: I'll buy you two beers for that
04:28 PM bss36504: Well, we use Silicon Labs stuff, so maybe when I'm more familiar with it I will
04:28 PM bss36504: I don't really have a favorite ARM. They're all pretty much interchangeable in my brain.
04:28 PM polprog: maybe i could write something
04:29 PM Emil: bss36504: lets say stm32, then
04:29 PM Emil: Because they are widely available?
04:29 PM bss36504: Never used one :P
04:29 PM Emil: polprog: do it
04:29 PM Emil: bss36504: lulz
04:29 PM polprog: Emil: but what would i write about??
04:29 PM Emil: bss36504: I'll take gecko, too
04:29 PM Emil: bss36504: they have cool radio cores
04:29 PM Emil: polprog: hmm
04:29 PM Emil: polprog: what are you good at?
04:29 PM Emil: What do you know that you could share?
04:30 PM polprog: i know, ill write on linux avr toolchain under linux shell
04:30 PM Emil: You don't have to be particularly good
04:30 PM Emil: Just what you know
04:30 PM Emil: polprog: like emil.fi/avr and emil.fi/toolchain?
04:30 PM Emil: or whatcha mean?
04:31 PM Emil: Also, just because someone has already written about something doesn't mean you can't write about it, too!
04:31 PM polprog: yeah something like that
04:31 PM Emil: So go for it! :)
04:31 PM polprog: i should set up a blog on polprog.net
04:31 PM Emil: If you want a challenge, do an arm version of emil.fi/Avr
04:31 PM polprog: ive never touched an arm in my life
04:32 PM Emil: bss36504: I have an acquitance who draws the RF cores for most of silicon labs bluetooth devices :D
04:32 PM Emil: and by draw, I mean designs them hardware wise
04:32 PM Emil: You know how SiLabs bought Bluegiga and so on
04:33 PM Emil: He's been trying to convert me to Geckos for some time now but I've not fallen since they don't have clear instructions on GUI-less development
04:42 PM polprog: night
04:43 PM bss36504: Emil: They're pretty cool.
04:43 PM bss36504: What do you mean by GUI-less?
04:48 PM Lambda_Aurigae: command line
04:49 PM Lambda_Aurigae: no IDE
04:49 PM Lambda_Aurigae: use your favorite text editor and command line tools to compile
04:53 PM bss36504: Why would I do something like that?
04:53 PM bss36504: IDEs make my life easier
05:10 PM Lambda_Aurigae: yours
05:10 PM Lambda_Aurigae: not mine.
05:23 PM Emil: bss36504: STOP NOT USING A VM
05:23 PM Emil: polprog: night
05:23 PM Emil: bss also you are a lost cause :D
05:42 PM nuxil: So i replaced my pots with rotary encoders. got things a lot more stable on the scope. but my code mess and is just wrong when it comes to adjusting the freq/duty cycle.
05:42 PM nuxil: please take a look at my simple code and give me tip how to do fix it. https://pastebin.com/YrdCC7UG
06:19 PM day is now known as daey
07:17 PM nuxil: do i have this correct?? question -> https://pastebin.com/yt74ivZF
07:17 PM * nuxil pokes Emil
07:17 PM nuxil: no code.
07:19 PM nuxil: am i on the right way with my thinking ?
07:19 PM Emil: nuxil: pls
07:20 PM Emil: use the potentiometers
07:20 PM Emil: also
07:20 PM nuxil: i trashed them.
07:20 PM Emil: why the heck are you using 1MHz clock
07:20 PM Emil: When you could be using 8MHz
07:20 PM nuxil: screw that for now.
07:20 PM Emil: wtf niga
07:20 PM Emil: it's a single fucking fuse or changing it in code
07:21 PM nuxil: read my question in the paste and tell me if i got the gist of it ?
07:21 PM nuxil: then i can start mess with the cpu clock
07:21 PM Emil: CLKPR=(1<<CLKPCE); CLKPR=0;
07:22 PM Emil: Also what the fuck
07:22 PM Emil: >I want to have a min precition of 5% on the dutycycle.
07:22 PM Emil: Last time it was 25%
07:23 PM nuxil: yea i 25 seems to big :p
07:23 PM Emil: Also why are you only using powers of two in the OCR registers?
07:23 PM Emil: or are those just test calculations?
07:23 PM nuxil: test
07:25 PM nuxil: but that the vasic idea right ?
07:25 PM nuxil: *thats
07:25 PM Emil: niga pls
07:25 PM nuxil: arg.. cant type
07:25 PM Emil: don't fucking poll the buttons
07:25 PM Emil: use the INT0 interrupt if you are going to use a rotary encoder
07:25 PM Emil: also you still need to filter it with hysteresis for example
07:26 PM Emil: Also why are al your variables global?
07:26 PM Emil: Don't do that
07:26 PM Emil: Use local variables
07:27 PM Emil: Your compiler has a better chance of using registers for them instead of sram
07:27 PM nuxil: Emil, give me time to perfect the code after i get it working. :p bare in mind im a noob
07:27 PM Emil: Also
07:27 PM Emil: why
07:27 PM Emil: are
07:27 PM Emil: you
07:27 PM Emil: using
07:27 PM Emil: int8_t?
07:27 PM Emil: uint8_t pls
07:28 PM Emil: Why would you pass int8_t to your adjust_* functions?
07:28 PM Emil: Ah
07:28 PM Emil: because you want to select direction
07:28 PM nuxil: yes
07:28 PM Emil: niga your code is spaghetti
07:28 PM nuxil: i know :D
07:29 PM nuxil: bad spaghetti
07:29 PM Emil: ISR(INT0_vect)
07:29 PM Emil: use that instead of polling
07:29 PM Emil: you need two pins to read the rotary encoder state
07:29 PM Emil: every time INT0 triggers check the state of the other pin
07:29 PM Emil: If it's 0 go otherway if it's 1 go the other way
07:30 PM nuxil: oki.
07:30 PM Emil: But sure your code might work
07:30 PM nuxil: it doesnt
07:30 PM nuxil: well.
07:30 PM nuxil: the frequency stuff is a mess
07:30 PM Emil: Also then #define 1000000L use UL instead
07:31 PM Emil: I mean it doesn't really matter
07:31 PM Emil: but it's better imho
07:32 PM nuxil: alright.. time to clean up some.
07:32 PM nuxil: thanks for tips
07:43 PM Emil: nuxil: what you need to do is graph resolution-frequency-plots for every prescaler
07:43 PM Emil: and select the best ranges based on that
07:44 PM nuxil: yea i do.
07:45 PM Emil: OCR0A-OCR0B maps
07:46 PM Emil: It's actually a 3d plot
07:46 PM Emil: You have OCR0A on one axis, OCR0B on another
07:46 PM Emil: and on the last axis you can put like resolution or something
07:47 PM Emil: Well actually that's determined by OCR0A alone
07:47 PM Emil: Prescaler-OCR0A plots
07:49 PM nuxil: man. i know i was thinking about that then i wrote the last paste i posted. turned out to me a lot more work than what i thought it would be for a simple squar wave generator :)
07:49 PM nuxil: why didnt i just stick with a couple of shmitt triggers :p
07:53 PM Emil: Imho it's super simple
07:53 PM Emil: especially if you just stick to ADC
07:53 PM Emil: instead of rotary encoders
07:58 PM nuxil: if i had good pots i might have continued on that routed. but the pots i had was some old pots from a crappy stereo from the 80's made in china. but i had a couple of rotor enc
07:59 PM nuxil: besides.. pots are so 80's anyway :p
08:00 PM HelloShitty: Guys, help me figuring out something that should be simple
08:00 PM HelloShitty: in terms of bitshift operators how do I accomplish this:
08:00 PM nuxil: << and >> ?
08:00 PM HelloShitty: 1000 -> 1100 -> 1110 -> 1111
08:01 PM HelloShitty: I tried:
08:01 PM HelloShitty: x |= x>>1;
08:01 PM HelloShitty: but it's not working, I guess
08:02 PM HelloShitty: If I have x = 0b1000; and do that operation
08:02 PM HelloShitty: it would be:
08:02 PM HelloShitty: 10000 | 0100;
08:02 PM HelloShitty: no?
08:02 PM nuxil: you want or =
08:02 PM nuxil: ?
08:03 PM HelloShitty: I want that x goes from 1000 to 1111, step by step
08:04 PM HelloShitty: Wasn't my reasoning correct?
08:04 PM HelloShitty: About the operations?
08:04 PM HelloShitty: 1000 >> 1 = 0100
08:04 PM HelloShitty: and
08:04 PM HelloShitty: 1000 | 0100 = 1100
08:04 PM HelloShitty: no?
08:04 PM nuxil: yes
08:05 PM HelloShitty: so x |= (x >> 1) should be the same
08:05 PM HelloShitty: no?
08:05 PM nuxil: try
08:06 PM HelloShitty: ok, it already worked
08:06 PM HelloShitty: I tried it before
08:06 PM HelloShitty: but probably I forgot the parenthesis
08:23 PM Emil: nuxil: pls
08:23 PM Emil: Like me and cehteh said
08:23 PM Emil: add the fucking filtering
08:23 PM Emil: and if your pots are nonlinear, make them linear by adding a function
08:23 PM Emil: pls
08:24 PM Emil: HelloShitty: lulz
08:24 PM cehteh: nuxil: when you recovered pots from an old stereo then chances are high that these are logarithmic
08:25 PM Emil: HelloShitty: the order of opeartions in C is retarded sometimes
08:25 PM cehteh: glhf with those when you need linear
08:25 PM Emil: They are most likely two linear stages together
08:26 PM cehteh: linear and bypass
08:26 PM cehteh: you can easily make a linear pot logarithmic
08:27 PM cehteh: but other way around needs some thinking and look how it is built
08:37 PM nuxil: hmm.. something is messup with the some header file in the avr lib for the atiny85.
08:37 PM nuxil: ISR(PCINT3_vect) gives error.
08:37 PM nuxil: 'PCINT3_vect' appears to be a misspelled signal handler
08:37 PM nuxil: :\
08:38 PM nuxil: oh. its not defined
08:39 PM nuxil: would this be the correct definition ? #define PCINT3_vect _VECTOR(3)
08:39 PM Emil: stop
08:39 PM Emil: the header files are fine
08:39 PM Emil: (unless you downloaded something really shit)
08:39 PM Emil: There is no PCINT3_vect on attiny85
08:40 PM nuxil: pin2 in datasheet says it has PCINT3
08:40 PM Emil: Also use the INT0_vect instead of PCINT
08:41 PM Emil: nuxil: that's not the vector
08:41 PM Emil: that just means that there is pin change interrupt available for that pin
08:41 PM Emil: PCINT interrupts are bank based
08:41 PM Emil: the correct vector is PCINT0_vect
08:41 PM Emil: http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
08:42 PM nuxil: so int3_vect ?
08:42 PM Emil: wtf
08:42 PM Emil: niga
08:43 PM Emil: do you even read the datasheet?
08:43 PM Emil: It's only 234 pages and you can use search
08:48 PM nuxil: dude, no reason for name calling.. if you think im too stupid then just keep silence. you been calling me niga sevral times now. there is absolutly no reason to be rude just be cause someone is a noob.
08:49 PM Emil: ...
08:49 PM Emil: niga pls
08:49 PM Emil: nuxil: how about you drop that attitude
08:50 PM Emil: jeebus
08:50 PM Emil: every time
08:50 PM nuxil: sure. and how about you be abit more pollite ? btw how have attitute been rude to you ?
08:52 PM Emil: No, by trying to force your way of idiotic thinking. If someone is wrong it's better to say that instead of silence. Also it's not rude, it your view of it as rude.
08:52 PM Emil: nuxil: so drop the fucking victim complex
08:52 PM Emil: If you have not noticed I've been helping you
08:53 PM Emil: If you want that to continue don't bring your attitude into this because you have feelz
08:53 PM nuxil: you know if i annoy you to much with my noobness, there is ignore fucntion on most ircclients.
08:53 PM nuxil: its still no reason to go around calling people niga just because they dont live up to you expectations.
08:53 PM Emil: lulz
08:56 PM nuxil: i appreciate your help, not you name calling ;)
08:56 PM Emil: I don't care
08:56 PM Emil: you should learn to internet if you take offense to "niga"
08:57 PM nuxil: So. just because its internet it gives you a excuse to be rude to be people ? name calling is offencive.
08:59 PM Emil: lol
09:00 PM Emil: a) yes b) not rude, get rid of that victim complex c) only if can't infer context and have a victim complex
09:00 PM Emil: and if you have a victim complex you are better made aware of that
09:05 PM nuxil: my nick is not niga its not some offensive name, if my nick was niga, i wouldnt complain.
09:05 PM nuxil: Do you want me to refere to you as "Emil the White trash"?
09:05 PM Ameisen: Trying to come up with a better algorithm than a binary search to handle a lookup table
09:06 PM Ameisen: but there's no clear relationship between the keys, only that they are ascending
09:06 PM Emil: nuxil: alll my lulz
09:06 PM Emil: nuxil: fuck off
09:06 PM Emil: Ameisen: what table? The shift one?
09:06 PM Ameisen: no
09:06 PM Ameisen: other issue unrelated.
09:07 PM Emil: Are you sure there is no relationship between the keys?
09:07 PM Ameisen: https://pastebin.com/Gh0kU7tJ
09:07 PM Ameisen: there's no clear mathematical relationship I can see that I can use to derive like a hash map or such easily
09:07 PM Ameisen: the values are clearly related, the keys just ascend
09:08 PM Emil: umm
09:08 PM Emil: The right column descends by 5 every time
09:08 PM Ameisen: Yes. The right hand column are values, not keys.
09:09 PM Ameisen: The left hand are sensor values which equate to the right hand values
09:10 PM Emil: did you try delta?
09:10 PM Emil: I mean, calibration data can be harder to map
09:10 PM Emil: but
09:11 PM Ameisen: the deltas between the values ascend for the most part, then descend
09:12 PM Ameisen: there's a curve there, but I haven't eben able to approximate it with any good regression
09:12 PM Ameisen: even high order regression has a lot of error
09:15 PM Emil: Buuut
09:15 PM Emil: does it need to be exact?
09:15 PM Ameisen: As exact as possible would be nice, however
09:15 PM Ameisen: I wasn't able to get 'close enough to even be usable' until like, 6th order
09:15 PM Ameisen: at which point a binary search is way faster
09:16 PM Emil: heh
09:17 PM Ameisen: even at Octic Regression, it was off by a lot sometimes
09:17 PM Emil: Ameisen: https://oeis.org/
09:17 PM Emil: use that
09:19 PM Ameisen: nothin :(
09:19 PM Ameisen: even subsets don't show anything
09:19 PM Emil: try the deltas
09:19 PM Emil: 0 1 2 2 2 2 3 3 3 3 4 4 4 5 5 5 6 7 7 9 iirc are the first few
09:21 PM Ameisen: noperinos
09:21 PM Emil: Can you give the full delta list?
09:21 PM Ameisen: small bits sometimes, but not meaningful enough
09:21 PM Ameisen: 1,2,2,2,2,3,2,3,3,4,4,4,5,5,5,6,7,7,9,9,10,11,12,13,14,16,18,19,21,23,24,27,28,31,32,34,35,36,38,37,38,38,36,35,34,32,29,27,25,22,19,17,15,12,11,9,8,6,5,4
09:21 PM Emil: Remove one
09:21 PM Emil: from that
09:21 PM Emil: from every value
09:22 PM Emil: s/remove/subtract
09:23 PM Emil: You could also split it in two