<set_> I saw it. I will look it over some more.
<set_> Thank you...
<set_> Everywhere I read, even by TI's SDK, it seems the math part is simple but then complicated because of different sources returning different examples of so-said math.
<set_> I mean. I made up this one: https://pastebin.com/HaAbF8Hv
<set_> I have changed it many times since that initial testing.
<set_> My latest-greatest seems to nail down the inches and mm aspect to the maxbotix sonar senser.
<set_> But...
<set_> It has bugs in it. It is like every so often, there is some glitch. I report back 01 or another odd value.
<set_> It should be 1 and not 01. So, something like blah()[1:-1] would alleviate that but...
<set_> Just every so often, something odd happens. It is running slowly so I can catch it. Every 4.5 seconds or so or less it prints.
<set_> Anyway, Let met get my latest.
<set_> I do something with foot = 1 && inch = (foot / 12) && mm = inch * 25.4.
<set_> What do you say that source would read back on the MaxBotix or some sonar that promotes sonar in a sensor package?
<set_> ADC = (1.8 / 512) / inch && ADC_mm = (1.8 / 512) / mm <<< These lines in the source may not be right.
<set_> I say that because inch is not well defined.
<set_> If inch is not defined well enough, mm is out of whack too.
<set_> But...
<set_> The MaxBotix people saw in their EZ papers/datasheet that (v / 512) / inch.
<set_> I guessed at v.
* set_ says lazy is not me. I need to double check.
<set_> I just say 1.8 since the high as it can go is 1.8v.
<set_> Oh.
<set_> I better watch it.
<set_> Less is good and I do not dictate what is less. More is bad since it can report higher than 1.8v. Hmm. I am clueless.
<set_> Maybe, they were saying v as in 3.3v.
<set_> Dang it.
<set_> 3.3v! vref
<set_> oops.
<set_> Luck of the draw...
<set_> So, 4094 with blah()[1:-1] <<< ?
<set_> I wonder. Is / divided by inch or is it / per inch?
<set_> Blah.
<set_> it is not vref. It is vcc.
vagrantc has quit [Quit: leaving]
<set_> I think ut oh'ed it.
<set_> Dang it.
<set_> I am at 2.20 on the ADC now. Argh...
<set_> Hey @zmatt: I tested the source. can I use it? No. Can I keep trying? Yes. Look at this reading: channel is: raw(0)0.06422466422466422
ikarso has quit [Quit: Connection closed for inactivity]
<set_> D = Vin * (2^n - 1) / Vref
<set_> That is what I got from TI's site.
<set_> So, if I had a POT to use, I could signify the voltage of Vin.
<set_> Anyway...up, up, and Otay.
Shadyman has joined #beagle
buzzmarshall has quit [Quit: Konversation terminated!]
rob_w has joined #beagle
ft has quit [Quit: leaving]
ikarso has joined #beagle
<zmatt> set_: my code already converts the adc value to a voltage... that's why the method is named "voltage" :P
Shadyman has quit [Quit: Leaving.]
florian has joined #beagle
notserpe has quit [Quit: Connection closed for inactivity]
SJFriedl has quit [Ping timeout: 260 seconds]
zjason has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
zjason has joined #beagle
rob_w has quit [Remote host closed the connection]
ikarso has quit [Quit: Connection closed for inactivity]
florian has quit [Quit: Ex-Chat]
ikarso has joined #beagle
ft has joined #beagle
mvaittin_ has quit [Ping timeout: 245 seconds]
SJFriedl has joined #beagle
notserpe has joined #beagle
SJFriedl has quit [Ping timeout: 260 seconds]
SJFriedl has joined #beagle