#avr Logs

Aug 27 2017

#avr Calendar

07:50 AM Emil: https://emil.fi/jako/kuvat/2017-08-27_15-19-13_0Keqsuna.png
07:53 AM Emil: Thoughts?
07:53 AM Emil: Oh yeah missed a ground
07:53 AM Emil: https://emil.fi/jako/kuvat/2017-08-27_15-21-22_hopFxBoI.png
07:53 AM Emil: I mean sure the 2M isolation is a bit sketchy :D
07:53 AM Emil: but it should work
07:53 AM Emil: At least simulation works
07:54 AM Emil: Hmm I could make it 10M per side
07:59 AM Emil: https://emil.fi/jako/kuvat/2017-08-27_15-28-44_u0JiZpms.png'
08:01 AM Emil: ¨Hmm
08:01 AM Emil: I don't really need the dual relays
08:01 AM Emil: Nowait I need
08:01 AM Emil: If I had something like SP3T relay then I would only need one
08:03 AM Emil: Hmm, the ADC impedance is a problem
08:05 AM Emil: I wonder if I should add an opamp
08:08 AM polprog: hmm
08:09 AM polprog: i dont like how pullups are separated
08:09 AM polprog: it doesn't do well for readability
08:09 AM polprog: and the reset pullup is looking like a pulldown
08:11 AM Emil: I find pullup/down separation excellent for readability
08:11 AM Emil: But this isn't about aesthetics :D
08:16 AM Emil: hmm, I guess I'll add the opamp. It's only a single component since I'm only after buffering
08:17 AM Emil: Might aswell add footprints for amplification though. I don't have to populate them
08:23 AM Emil: https://emil.fi/jako/kuvat/2017-08-27_15-52-46_5YOlgMLg.png
08:33 AM polprog: i dont know much about that but some other designs i saw used a differential amp
08:47 AM Emil: https://emil.fi/jako/kuvat/2017-08-27_16-16-15_YvYKWYqB.png
08:47 AM Emil: SNEK
08:49 AM polprog: lol
02:07 PM day_ is now known as daey
05:37 PM Emil: https://emil.fi/jako/kuvat/2017-08-28_01-06-19_4LcdEFDV.png
06:36 PM Thrashbarg_ is now known as Thrashbarg
07:56 PM enh: hi
07:57 PM enh: did you know about this #pragma GCC push options?
07:57 PM enh: you can switch off optimization for only part of the code
07:57 PM enh: #pragma GCC optimize ("O0")
08:00 PM Thrashbarg_ is now known as Thrashbarg
08:03 PM theBear: didn't you say that last night ? and if yer asking (not just making an announcement,) i say look em up, i thinik they in the man/info pages for gcc somewhere, otherwise at the website with all the gcc docs
08:03 PM enh: sorry, theBear. I said that then I left.
08:05 PM enh: SOmehow I only learnt about this yesterday. I've been looking for this kind of option for some time. Strangely GCC optimizes the cde in stragne ways that cannot be protected even with the volatile word
08:07 PM theBear: enh, it's all very well defined how/what it does tho, and you can always inspect the compiled output in context of the code that made it happen, in some cases i found it handy to just compile a teeny snippet of code and inspect that, cos ya know, much easier to find the relevant output, and generally just shows what you wanna see
08:08 PM enh: sometimes it produces really strange behaviors
08:08 PM theBear: also the gcc versions that stuff first came working with, aren't very old at all, in the big picture of things.... all the pragma stuff i ever done (not much yet) has only existed a few short years,maybe even less
08:09 PM theBear: enh, they only seem strange until you see how they happened, then suddenly they make a ton of sense...
08:09 PM enh: I lack the expertise to see how they happen, theBear
08:10 PM theBear: enh, heh, how you think we learned ? and it not like there aren't a LOT of docs for more gcc info than anyone could ever possibly need
08:11 PM enh: for example, now avr-gcc is not updating a variable value in memory. All the code is right, but in runtime it is messing with my SPI protocol.
08:11 PM enh: and the variable is volatile
08:12 PM enh: I believe I 'll have to sit and learn these -f gcc options very soon
08:15 PM theBear: i find that reviewing the facts/rules about all that variable stuff is always a help, just reminding yerself VERY clearly from the official docs how things like pointers and global and volatile etc etc etc are defined and treated.... seems to sort out a LOT of issues that tend to look like what you just described, ya know, a bit... and over the years soemtimes rules change a bit, and iot certainly easy to mix-up different languages/compilers
08:15 PM theBear: rule/definitions of such things
08:16 PM enh: I certainly will have to go into that
08:29 PM enh: For now I'm reviewing the code again to confirm I did no wrong stuff
08:29 PM enh: theBear: is there a source for gcc wisdom?
08:31 PM Lambda_Aurigae: google
08:31 PM enh: :)
08:31 PM enh: google is a generic wisdom source
08:31 PM Lambda_Aurigae: but of course.
08:32 PM enh: or a source of generic wisdom, if that can be named in this way
08:37 PM enh: Today I took a shooting course. With a .380 pistol. A huge amount of training is needed to correctly handle a pistol.
08:37 PM enh: I wonder how people just use guns without trainning
08:38 PM theBear: enh, yeah, like i said the man/info pages that it comes with, and whatever the main kinda gcc webpage is called, i pretty sure has the definitive 'this is how this XYZ works' docs on it
08:41 PM Lambda_Aurigae: enh, I've been shooting guns since I was big enough to hold one on my own.
08:41 PM Lambda_Aurigae: but, my father was a USAF survival instructor.
08:42 PM enh: Lambda_Aurigae: I have that experience with long weapons. Had not much experience with short ones. And pistols are another animal.
08:42 PM enh: You must have learn a lot from your father
08:44 PM enh: But I could put 40 bullets in the inner ring, in 50 shots. The 10 missing ones were due to a soot as fast as you can sequece.
08:44 PM enh: Shooting fast is like shhoting blind for me
08:45 PM Lambda_Aurigae: enh, pistols, rifles, shotguns, bows, crossbows, thrown weapons...we learned them all.
08:46 PM enh: Lucky you
08:46 PM Lambda_Aurigae: I learned that shooting fast is not as important as shooting accurately.
08:46 PM Lambda_Aurigae: specially when hunting.
08:46 PM enh: Agreed
08:46 PM Lambda_Aurigae: be the prey four legged or two.
08:47 PM theBear: heh, bullets are fast, surely that's so you don''t need to be
08:47 PM enh: My father used to say anybody can drive fast, but few people know how to drive slow
08:47 PM Lambda_Aurigae: those 10 rounds that missed could have saved your life,,,or fed you 10 meals or more.
08:47 PM enh: Agreed
08:48 PM Lambda_Aurigae: when I got out of the USAF myself I had the marksman ribbon with 3 clusters...and I was in for 5 years.
08:48 PM enh: I took approx 2 seconds to fire the pistol accurately. Pulling the trigger faster means loosing the target for me.
08:49 PM Lambda_Aurigae: you don't pull the trigger..you squeeze it.
08:49 PM Lambda_Aurigae: like making a fist.
08:49 PM enh: not enough english knowledge to understand the difference.
08:49 PM Lambda_Aurigae: by pulling just one finger for the trigger you tend to pull the barrel upwards.
08:50 PM Lambda_Aurigae: by squeezing your entire hand you keep that gun steadier.
08:50 PM enh: I bring it to me, until I'm surprised by a shot.
08:50 PM enh: never tried that, Lambda_Aurigae
08:50 PM enh: I'll try next time
08:50 PM theBear: mmm, pulling the trigger without throwing yerself out seems to be a big problem among many people shooting, sometimes even experienced ones... kinda like doing artwork/cad with a mouse (which i hate, i'm all intro trackball for many years now, cos ya know, you can position something, then press or unpress a button that ISN'T mechanically connected to the ball movement
08:50 PM Lambda_Aurigae: takes some getting used to but it gives me much better control over multiple shots.
08:51 PM enh: I'll think about that
08:51 PM Lambda_Aurigae: theBear, that's why I use a second mouse with no movement capability for clicking with the other hand.
08:51 PM Lambda_Aurigae: never got comfortable with trackballs.
08:52 PM enh: My father liked guns too. He taught us about discipline and safety with weapons. Wise lessons.
08:52 PM Lambda_Aurigae: a gun is always loaded
08:52 PM Lambda_Aurigae: period
08:52 PM enh: yep
08:52 PM Lambda_Aurigae: whether you unloaded it yourself or not...it's always loaded.
08:52 PM enh: yep
08:52 PM theBear: Lambda_Aurigae, mmm, i approve, also nice thinking outside the mouse-shaped-box ;-) tho trackballs are a lifetime choice for me long before now i think...the whole not-needing-desk/some-space to roll a mouse around in is also a big advantage in my eyes
08:52 PM Lambda_Aurigae: that's one lesson that I had drilled into me before I was ever allowed to fire one.
08:53 PM enh: me too
08:53 PM Lambda_Aurigae: theBear, I have a mouse that I covered the bottom sensor with black tape just for that kind of work.
08:53 PM theBear: well, it's always loaded if you were thinking of looking down the barrel or something stupid like that, but if yer havin' an old fashioned duel, you know, demanding some satisfaction, i suggest checking it IS loaded beforehand :)
08:53 PM Lambda_Aurigae: and the second mouse has the buttons cut so they don't work.
08:53 PM Lambda_Aurigae: theBear, yeah....
08:54 PM Lambda_Aurigae: but I have seen too many people shot because they thought the gun was unloaded.
08:54 PM Lambda_Aurigae: hell, one just about a month ago less than 5 miles from where I live.
08:55 PM enh: The instructor today ask what should we do if he ordered us to lift the pistols while he was in front of the fire line. I said we should leave the place and go away.
08:55 PM Lambda_Aurigae: guy was going to clean his gun so he dry fired it...he was in the basement...shot his wife in the foot...she was in the kitchen above him.
08:55 PM Lambda_Aurigae: he dry fired it to release the hammer..
08:55 PM enh: dry fired pointing up?
08:55 PM Lambda_Aurigae: yup.
08:55 PM Lambda_Aurigae: fucking idiot.
08:55 PM enh: gut.
08:56 PM theBear: heh, surely that would deserve being darwin'd by at least one of the students there, if he did say it
08:56 PM Lambda_Aurigae: I had an idiot at work brought in a gun once and pointed it at me.
08:56 PM Lambda_Aurigae: he was "playing around" with his new 9mm
08:57 PM Lambda_Aurigae: I grabbed it, removed the slide, and stuck the slide in my pocket and refused to give it back.
08:57 PM Lambda_Aurigae: told him if he ever pointed a gun at me again he would have a nice steel suppository because I was going to shove it up his ass so far he could taste the gun oil.
08:58 PM enh: Somebody did that with a pressure rifle when I was young. It was only once. I never got near those guys again.
08:58 PM Lambda_Aurigae: he threw all kinds of fit and went to the manager and said I threatened him and wouldn't give him back the piece to his gun.
08:58 PM Lambda_Aurigae: manager told me to give it back...I said the only way he was getting it back before the shift was over is if he called the cops.
08:59 PM enh: He could get shot easily.
08:59 PM enh: Here in Brazil 9mm pistols are restricted to armed forces
08:59 PM Lambda_Aurigae: then left me alone and I put it on top of his car when I was done for the day.
08:59 PM Lambda_Aurigae: here you just have to fill out some paperwork and wait 72 hours for the clearance check.
09:00 PM enh: You are a kind person, Lambda_Aurigae
09:00 PM Lambda_Aurigae: sometimes.
09:00 PM Lambda_Aurigae: I could easily have called the cops and said he threatened me with the gun.
09:00 PM Lambda_Aurigae: instead I just glared at him for the next week and he kept waaay away from me.
09:00 PM Lambda_Aurigae: that was more fun.
09:00 PM enh: I know some people whou would knock the guy down in your place.
09:01 PM Lambda_Aurigae: the look on his face when I disassembled his gun with one hand was priceless.
09:01 PM Lambda_Aurigae: hell, I was trained how to take those things apart and put them back together in the dark.
09:01 PM enh: I can imagine
09:01 PM enh: with one hand?
09:01 PM Lambda_Aurigae: easy enough if the hammer is already back.
09:02 PM Lambda_Aurigae: if you intend to point a gun at someone, don't do it when you are close enough for them to touch the gun.
09:02 PM enh: These are the things I'd like to learn. But only the army teaches that with enough discipline.
09:02 PM Lambda_Aurigae: take one apart enough times....3 or 4...and you can figure it out.
09:03 PM enh: more like 100 times
09:03 PM Lambda_Aurigae: naaa.
09:03 PM enh: I know enough about guns not to carry one.
09:03 PM Lambda_Aurigae: to get good at it, yeah.
09:03 PM theBear: eff the army, you don't need a neat short haircut to learn shooting and keep fit
09:04 PM Lambda_Aurigae: kinda like, if you are close enough to me to use a knife on me, you are close enough for me to use that knife on you.
09:04 PM Lambda_Aurigae: or my knife
09:04 PM enh: yep
09:04 PM Lambda_Aurigae: of which I usually carry 3
09:04 PM enh: I carry two on the car, one near my camera
09:04 PM Lambda_Aurigae: all of which are single hand open.
09:05 PM theBear: pfft, knives just get in the way of yer hands, which i always found know what to do better than any knife or my head, in those high pressure moments
09:05 PM Lambda_Aurigae: and I can open any with either hand.
09:05 PM Lambda_Aurigae: theBear, yeah....knowing how to use your hands is best.
09:05 PM Lambda_Aurigae: of everything, I prefer a 4 to 6 foot long stick...broom handle or similar is bestest.
09:06 PM enh: army info also.
09:06 PM Lambda_Aurigae: naaa.
09:06 PM enh: Don't you train that?
09:06 PM Lambda_Aurigae: self taught use whatever comes to hand street fighting.
09:06 PM Lambda_Aurigae: I got in fights a lot as a kid.
09:07 PM Lambda_Aurigae: or, rather, I got picked on a lot and learned to fight back and fight dirty.
09:07 PM enh: i learnt to avoid
09:07 PM Lambda_Aurigae: I was the knowitall geeky kid with no friends who these days everybody would say is likely to shoot up the school.
09:07 PM enh: in brazil we have to learn to keep our radars working all time.
09:08 PM Lambda_Aurigae: best concealed weapon I ever came up with was a roll of pennies.
09:08 PM theBear: Lambda_Aurigae, mmm, they certainly don't know all that stuff when yer born, but once they had some practice and instruction, they seem to remember it all good
09:08 PM Lambda_Aurigae: wrapped it in some black tape.
09:08 PM enh: roll of pennies? interesting
09:08 PM Lambda_Aurigae: kept it in my hand while walking.
09:09 PM Lambda_Aurigae: get in a fight, that gives you a bit more oompf to your punch.
09:09 PM enh: i prefer keys...
09:09 PM Lambda_Aurigae: my ex-wife had an icepick on her keychain..
09:09 PM Lambda_Aurigae: and used it one night after work.
09:09 PM Lambda_Aurigae: guy grabbed her from behind.
09:10 PM Lambda_Aurigae: she had that in her hand...just shifted her hips to the side and stabbed backwards with the pick.
09:10 PM Lambda_Aurigae: skewered his left nut.
09:10 PM Lambda_Aurigae: literally.
09:10 PM enh: a pity she missed the right one too
09:10 PM Lambda_Aurigae: I had sharpened that icepick nicely.
09:11 PM Lambda_Aurigae: apparently the blood loss looked like a massacre had happened.
09:11 PM Lambda_Aurigae: you bleed rather profusely from that area.
09:11 PM enh: keys work well too. Holding them well between your fingers make the fist more destructive
09:11 PM Lambda_Aurigae: it's also somewhat painful.
09:11 PM enh: somewhat
09:12 PM Lambda_Aurigae: for an adult, a roll of nickles is better than pennis...or find a roll of coins that fits your hand best.
09:12 PM Lambda_Aurigae: pennies
09:13 PM Lambda_Aurigae: squirtgun filled with ammonia works wonders too.
09:13 PM enh: I'll assemble one and keep inside the car
09:13 PM Lambda_Aurigae: against people and animals.
09:13 PM Lambda_Aurigae: used to keep one loaded in a little holder on my bicycle...great for stopping dogs.
09:13 PM enh: does it blind permanently?
09:13 PM Lambda_Aurigae: nope.
09:14 PM Lambda_Aurigae: but it burns like hell.
09:14 PM enh: gut
09:14 PM enh: must do
09:14 PM Lambda_Aurigae: bleach will do more permanent damage.
09:14 PM Lambda_Aurigae: household ammonia is caustic but not horribly so.
09:15 PM Lambda_Aurigae: vinegar works too....or,,,the juice from a jar of jalapenos.
09:15 PM enh: A guy tried to assault me near home, 6am , with my 6month old daughter near me. I said ok, I'll give you the cell phone. Then I caught the pepper spray and... Missed him. Shit.
09:16 PM Lambda_Aurigae: jalapeno juice is cheaper than pepper spray...and more legal in some areas too.
09:16 PM enh: I'll google jalapeno to see what is that in portuguese
09:16 PM theBear: heh, and much more fun to say, like peterpiper and his peckofpickles
09:17 PM Lambda_Aurigae: peter piper picked a peck of pickled peppers
09:17 PM Lambda_Aurigae: how do you pick pickled peppers?
09:17 PM Lambda_Aurigae: you have to pick the peppers first then pickle them.
09:18 PM enh: with vinegar?
09:18 PM Lambda_Aurigae: https://en.wikipedia.org/wiki/Jalape%C3%B1o
09:18 PM Lambda_Aurigae: yes, with vinegar.
09:18 PM enh: Amazing juice
09:18 PM enh: Never had such thing near my eye. Must not be good
09:18 PM Lambda_Aurigae: basically, hot pepper pickled in vinegar...eat the peppers, use the leftover vinegar juice for the squirtgun.
09:19 PM Lambda_Aurigae: or juice some onions..
09:19 PM Lambda_Aurigae: pretty much anything like that will screw with someone royally.
09:19 PM enh: Good, legal, ideas.
09:20 PM enh: pepper spray is illegal here. But I got one. Better than a gun.
09:20 PM Lambda_Aurigae: yeah.
09:20 PM Lambda_Aurigae: so, make onion spray.
09:20 PM Lambda_Aurigae: or just a squirtgun filled with ammonia.
09:20 PM Lambda_Aurigae: good for both people and dogs.
09:20 PM enh: Thanks.
09:20 PM Lambda_Aurigae: just get a good quality squirtgun that doesn't leak.
09:20 PM Lambda_Aurigae: those can be hard to find sometimes.
09:21 PM Lambda_Aurigae: small spray bottle works too.
09:21 PM enh: here they are
09:21 PM enh: these are easier
09:21 PM Lambda_Aurigae: https://www.amazon.com/Soft-Style-Fine-Spray-Bottle/dp/B000NJ2218/ref=pd_day0_194_1?_encoding=UTF8&psc=1&refRID=N0RFP1PJB612EVTVJPDG
09:22 PM Lambda_Aurigae: something like that...We have several that are maybe half that size.
09:22 PM Lambda_Aurigae: use them for cat control.
09:22 PM Lambda_Aurigae: keep water in them to squirt the cat when she gets up on the table or kitchen counters.
09:22 PM Lambda_Aurigae: anyhoo...bedtime here.
09:22 PM Lambda_Aurigae: nighters.
09:23 PM enh: sleep well
09:32 PM Thrashbarg_ is now known as Thrashbarg
11:52 PM day_ is now known as daey