#general-chat

1 messages · Page 75 of 1

dusty citrus
#

Hm
Liquid Silicone comes in two solutions, when mixed they make silicone cure
I can't get a cast to dip in each solution at a time, and get a cured silicone at the end?

rapid geode
#

O_o

#

silicone is about the consistency of grek yogurt. you arent gonna dip anything, even if they did cure,which they wont

#

what exactly are you trying to do?

dusty citrus
# rapid geode silicone is about the consistency of grek yogurt. you arent gonna dip anything, ...

Eh never really had to do with it before, I bought some latex a time ago, but it was a pain and it had a strong ammonia like smell

Anyway I need a silicone like film, but due to the geometry the best would be to dip cast the geometry into some liquid material,

an alternative may be to have a positive+negative cast, where the silicone is dipped, but due to the geometry it would be a real pain

rapid geode
#

ahh

#

in those cases, you would just brush on the silicone. there are special silicones they use for special effexts, makeup etc that might be the most suitable

#

silicone will usually flow out so you wont see the brush strokes

#

depends how thin you want it to be as well.

#

3-5mm is pretty easy.

#

where it will coat and flow but not sag and drip off

ebon dew
#

you can get liquid plasti-dip in a can. it was originally designed for dipping tool handles in. it's not like the spray on plastidip.

#

can also get liquid rubber in a can

rapid geode
#

but that wont come off usually

#

im assumeing they want the film, and not a coated part

ebon dew
#

yeah after many years... how long you need it to last?

#

oh then glue stick... goes on hot and can be ripped out relatively easily.

rapid geode
#

O_O

#

im not sure that is applicable here.

#

but need more info

ebon dew
#

if you want to make molds then use two part silicone for mold making.

rapid geode
#

i think he wants a silicone molded PART

#

finished part made of thin silicone

#

like a mask for example

ebon dew
#

make a negative with plaster of paris, and fill with silicone then

dusty citrus
fierce prawn
#

Do you all know how stereo works in earphones

My normal earphones sounds sucks while listening to Dolby Atmos but my Onn. Tws in ear have good bass and good reverb

Always curious on how they work

slim shard
#

well, stereo is one sound channel per speaker for 2 speakers, so on that level, stereo works in an obvious manner in earphones
I presume atmos is a system with several audio streams with many virtual spatial positions, meaning that the difference would probably be how it decides to mix the audio for the headphone speakers?

whole jacinth
#

yeah, the quick answer is that professionally produced stereo audio is often mixed for playing on speakers, not headphones. you can do some postprocessing on such an audio signal to make it sound like it's playing on speakers when played through headphones, mostly by adding some delays and reverb (which makes some assumptions about your outer ear and head geometry)

fierce prawn
#

Yeah but why my tws earbuds are better that my wired earphones

whole jacinth
#

my understanding is that formats like Atmos have enough spatial info encoded that it can be remixed for specific playback equipment, but usually you have to pay for premium devices that handle it (the analog wired earphones probably get the "stereo speaker" mix)

fierce prawn
#

Does that even support Atmos

whole jacinth
#

theoretically, you could buy some software that does Atmos decoding on your computer and mixes it for analog headphones. no idea if that's what your wireless are doing, or maybe it's doing some default virtual speaker thing of its own

urban arrow
#

Howdy. I have an older re-manufactured HP desktop about a year old which has been working for me just fine. A couple of recent stupid Win 10 "mandatory" "updates" started causing problems, and then the latest (yesterday) and now it won't startup to Windows. Tried everything. I'm no expert. Anyway I've ordered another one. Too cheap to get brand new... I have another backup (slower) HP I'm using now, and I have most stuff backed up so I'm in fairly good shape. I never could find a way to turn off Win 10 automatic updates.

fierce prawn
fossil dawn
#

not even a full&clean windows re-install revived it?

urban arrow
#

Thanks, not sure how to do that. It came with Win 10 installed.

rapid geode
#

only win 10 pro can disable auto updates

fierce prawn
rapid geode
#

to disable in win 10 pro you edit the group policy

fossil dawn
# urban arrow Thanks, not sure how to do that. It came with Win 10 installed.

You need a still working PC to put the windows installer on a USB drive. https://www.microsoft.com/de-de/software-download/windows10 (Microsoft has no language selector so hopefully that just redirects you to the english page.) There are probably tutorials on the internet about how to install windows, but the installer is pretty straightforward.
And important:
DO NOT download a "windows ISO" or "windows installer" from any sketchy website. I linked you the page directly from microsoft.
Putting the windows installer on the USB drive will delete all files currently on the USB drive! But after you're done you can just delete the windows installer and use the usb drive normally again.
Of course a "clean full reinstall" means wiping the entire HDD/SSD so you lose all files on the laptop unless you "rescue" them before!

#

(I actually don't know how Windows licensing works nowadays. I upgraded from 7 to 10, then reinstalled 10, changed hardware, upgraded to 11 and it always just automatically activated. Maybe it associated the license with my microsoft account. And I think devices with preinstalled Windows have some magic that windows reinstall also gets activated. But I don't know.)

olive dome
#

yeah, quite a few discord server has crashed

glad ruin
tardy badger
#

Is it finally the end of the world? And right before Christmas too, a shame really

#

/sarcasm

olive dome
#

touch grass™

tardy badger
#

Lol

#

I’m glad I’ve got plenty of things I can do if the internet goes down

tranquil swallow
#

yea same

#

its good to have hobbies that dont require electricity or sunlight

slim shard
rapid geode
#

O_o

urban arrow
# fossil dawn You need a still working PC to put the windows installer on a USB drive. https:/...

Thank you. I did the English website, and Download Tool, but the PC I used is Win 7, and the EXE throws an error. Fortunately, the offending PC decided to start up OK, after like 100 attempts, then sitting unplugged for 24 hours. Go figure. I still have a good similar HP coming. Gotta have a backup...
When I tried the bad Win10 HP again after long time sitting, it came up and said "updates 48% done" or something straightaway, so I guess the update got hung or whatever.

ebon dew
#

On the NRF52840 the TFT featherwing lite mod recommends using pin D2 for pwm backlight.

#

Does that still apply for ESP32-S2/S3's?

#

Considering I have no intention of ever using a physical debug pin.

ebon dew
#

I see no pin name DB. 😦

#
>>> import board
>>> dir(board)
['__class__', '__name__', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'BOOT0', 'BUTTON', 'D0', 'D10', 'D11', 'D12', 'D13', 'D14', 'D15', 'D16', 'D17', 'D18', 'D3', 'D35', 'D36', 'D37', 'D38', 'D39', 'D4', 'D5', 'D6', 'D7', 'D8', 'D9', 'I2C', 'I2C_POWER', 'L', 'LED', 'MISO', 'MOSI', 'NEOPIXEL', 'NEOPIXEL_POWER', 'RX', 'SCK', 'SCL', 'SDA', 'SPI', 'STEMMA_I2C', 'TX', 'UART', 'board_id']
#

says TXDO but I don't see that pin either.

#

Eventually fixed the issue by jumper wiring to A5 on the TFT Featherwing to use with the ESP32-S3 Feather.

ornate mirage
#

@faint fox I didn't know how else to reach you, but I figured you might be interested in a few LILYGO T-Deck updates. Let me know if you'd like to get in touch outside of Discord.

I'm working on creating a Community Bundle Library for the Goodix GT911, so that it may be included with the LILYGO T-Deck library. I've been working on piecing together a driver from the datasheet, until I discovered your driver in the PyDOS Virtual Keyboard repo. I used what you had to get my own prototype working, and I very much appreciate the work you did.

I still have a few issues to address, mainly consistency around retrieving the latest touch point. There's mention in the data sheet that the GT911's Register address needs to written to before the next touch event is available at that address. Additionally, the I2C address (0x14 or 0x5D) can be controlled by setting the INT pin HIGH or LOW before starting the device. The T-Deck doesn't have the GT911's RESET pin wired up, so its been quite difficult to test this. I'm considering purchasing a breakout board, but I'm curious to know if you've worked around that limitation.
https://github.com/rgrizzell/CircuitPython_GT911/tree/wip

I've also created some custom firmware for the keyboard. Flashing is a tedious process, but it adds a few QOL features.
https://github.com/rgrizzell/lilygo-t-deck-keyboard

faint fox
# ornate mirage <@899160869777342464> I didn't know how else to reach you, but I figured you mig...

I read the datasheet just enough to get the driver working for what I needed (the Makerfabs MaTouch) 😁 I didn't get my code to work the way I was reading the datasheet regarding the write/read order for touch events so my code is probably not as clean as it could be. Based on some of the other python examples I dug up and my reading of the datasheet, I thought that the I2C address could be set to the 0x5D address even though Makerfabs tied one of the signals low but I'm not sure the CircuitPython timing was consistent enough. In the end, I just fell back to the second address if the first didn't work. I'm a bit confused because I didn't even realize there was touch input on the T-Deck nevermind that it used the same controller as the MaTouch

tardy badger
#

What a nice Saturday build

rapid geode
#

nice. i was prepping this up to resin print as big as i cant a few days ago. gotta figure out how to cut it up into asemblable parts

honest trail
#

I've got a Pygamer and a Feather Wing ESP32 Wifi badge on it. Would it be possible to have the ESP32 download / flash the main PyGamer board with new apps?

#

Or is that something only the usb connection can do?

limpid sedge
#

hi so I connected BNO085 to the pico with circuitpython, but im getting No I2C device at adress 0x4a

#
import time
import board
import busio
import adafruit_bno08x
from adafruit_bno08x.i2c import BNO08X_I2C

i2c = busio.I2C(board.GP1, board.GP0, frequency=800000)
bno = BNO08X_I2C(i2c)
limpid sedge
limpid sedge
#

is it just possible that the BNO085 is bad unit or am i doing something wrong?

patent hemlock
#

on a Raspberry Pi, you should be using i2c = board.I2C() for the default bus

limpid sedge
limpid sedge
patent hemlock
#

you did not specify which platform

limpid sedge
limpid sedge
#

i got it work. If i want to stream sensor data over the internet, does adafruit IO work for that?

magic osprey
#

I'm kind of digging this style of project box with a pre-cut assortment of holes. I found it on one power supply kit, but not seeing similar enclosures anywhere. When finishing the project you could just electrical tape over unused holes; and then cover it up with with printed sticker with your knob and button labels.

vagrant wolf
brittle linden
ebon dew
#

Woah. N16R8 iMX1060 with WiFi 6 and BT. Sounds good but you'll have to use their SDK to take advantage of all the features.

brittle linden
rapid geode
#

iwant an x86 feather

#

hehe

late fulcrum
# magic osprey I'm kind of digging this style of project box with a pre-cut assortment of holes...

If you find something, let me know. There are a lot of companies that will make these, or you can laser cut or CNC them or have front panels fabbed as PCBs, etc., but I too would like an enclosure with a variety of ready-made openings. I had been considering doing a Kickstarter for a series with a variety of punch-out openings, but the one you show with all the openings already there, and you just cover the ones you don't need might be easier.

late fulcrum
#

Or just use an AVR feather and avr-x86

#

There's also the Arduino 101

rapid geode
#

i mean one that cvan run windows 10 fully. im just being silly here.

late fulcrum
#

Yes. Yes you are. There's a reason the Edison, 101, and other X86 based boards never caught on.

rapid geode
#

yeah

patent hemlock
rapid geode
#

ive had a silly cnc'd pc case idea for a while, but none of the boards are powerful enough to make it really a usefil thing. although a pi5 is probably pretty close

#

actually i dont want to run windows. i want to run linuxcnc on it

#

but it needs broadly the same type of pc

late fulcrum
#

Full disclosure: I'm currently working on a project to replace $1000 Dell boxes that are too large, too expensive, draw too much power, and generate too much heat in factory environments, and those are one of the companies I'm looking at as a vendor.

#

I did mention that a Raspberry Pi would probably do the job (all it's doing is fetching process control information from PLCs via OPC-UA and streaming it to the cloud using Greengrass), but they want something with all the industrial ruggedization checkboxes.

rapid geode
#

yeah ive looked at a lot of the mini boards. some are small enouigh and usable, buyt they cost way more than is justified ($500+ for most of them)

#

there was one called an up board? that was $250

#

was borderline

#

i think it was missing a feature i needed. i forget now. been a while

late fulcrum
#

The embeddedTS ones are generally $200-300 (for singles, they're cheaper in quantity). Fortunately, Linuxcns is much less demanding than w10.

rapid geode
#

they seem to all be arm. i need x86

tardy badger
#

Homemade chocolate covered English toffee

rapid geode
#

mmmmmmmmmmmmmmm

#

ive got my baking list for this week set

#

gonna be a lot of cat cookies

#

plus lemon and pumpkin tarts

#

and maybe a few other things

tardy badger
#

Candy canes were attempted

rare plank
#

Hello people i Just bought my first microcontroller!!!! The Adafruit Playground express!!!! Im so excited for it sadly it will be a bit delayed due to Christmas and all that :(

However im looking forward to get my hands on it and enjoy such a cool device

rapid geode
#

ooooh. hows did you make the candy?

#

i want to try candy

#

also gummy candy (gummy cats)

tardy badger
rapid geode
#

so more or less the same as hurcules on youtube, just small scale?

tardy badger
#

Gummies requires mixing gelatin in at a lower temperature

#

Yeah basically

rapid geode
#

no gelatin

#

corn starch candy (like sour patch or wine gums, sweedish fish etc)

#

you press a mold out of corn starch as well. and pour the candy in.

#

the molds i can do (cnc or print a male master). no idea how to safely anc cleanly pour it though

tardy badger
#

Gelatin is a very common ingredient for gummy candies, check the Wilton candy cookbook

#

There are varieties that are vegan that do not use gelatin

rapid geode
#

yeah but not for what i want

#

there are 2 main doft candies. gelatine based and corn starch based

tardy badger
#

But most major gummy candies use gelatin

rapid geode
#

actually almost none here have gelatin

#

gumjmy bears is about it

tardy badger
#

Gummy worms, gummy bears, etc.. pretty standard at least in the US

#

Sour patch kids do not though which is pretty cool

rapid geode
#

if i go to the candy section here. it is almost all maynards stuff. maybe cause they are made here.

tardy badger
#

Mostly anything similar to Swedish fish do not have gelatin

rapid geode
#

yeah. all maynars is corn starch candies

tardy badger
#

But I don’t really consider this gummy candies

rapid geode
#

ahh

tardy badger
#

I consider them more soft chew candy

rapid geode
#

fair

#

anyhow, thats what i want to make. sour patch cats

#

ha

tardy badger
#

Oh nice

#

I’d love to branch out

rapid geode
#

ill try that after xmas

#

im trying something with all the stuff i make right now. making youtube videos, which then link to the things to buy. I dont expect any meaningful youtube revenue,. but f it points people to the things being made, and lets them appreciate the work, it could be pretty good

#

we'll see

tardy badger
#

The proper name for candies like sour patch kids is jelly candies

rapid geode
#

ahh

tardy badger
#

Hand to use google foo

rapid geode
#

haha

tardy badger
rapid geode
#

neat

#

jelly beans also have no gelatin

#

so that make sense with the name

#

in the uk (and to a degree in canada) jelly means gelatin

tardy badger
#

I love me some jelly beans

#

Yeah, confectionery kind of muddles things a bit

rapid geode
#

you guys don't have smarties either.

#

i dont really know any american candy.

tardy badger
#

We have the chalky smarties

rapid geode
#

yeah, those are called rockets here

tardy badger
#

Sweet tarts I believe are equivalent to smarties in Canada

rapid geode
#

m&ms are usa smarties, but they have deviated to be their own thing and we have both

rapid geode
tardy badger
#

Nvm smarties in Canada are chocolate

rapid geode
#

yes

tardy badger
#

Why eat Canadian smarties when you can just eat M&Ms?

rapid geode
#

they are a uk candy. they went to the usa but the dextrose candies already existed there

#

smarties are better than m%ms

#

taste better. bigger. better candy shell

tardy badger
#

🤷‍♂️

rapid geode
#

hehe

tardy badger
#

You also have Mars Bars, yeah?

rapid geode
#

yes, mars and snickers

#

milky way is your mars right?

#

i forget

tardy badger
#

Caramel and nougat

#

?

rapid geode
#

i thought mars bars were named milky way in the usa

tardy badger
#

I think so

rapid geode
#

yeah

#

reeses cups are universal at least

#

haha

tardy badger
#

We also have classics like 100 Grand which are delicious but will cost you $100k to fix your teeth afterwards

rapid geode
#

haha

#

i dont think we have that

tardy badger
#

We also have baby Ruth which is just a payday covered in chocolate

rapid geode
#

neither of those here. we get a lot of euro candy

tardy badger
#

We have a Reese bar called a fast break

rapid geode
#

i went to the nesle factory for school once. mmmm

#

not nesle. neilson

tardy badger
#

Nougat, a thick bead of peanut butter, covered in Reese chocolate

rapid geode
#

when i was in the us thy have a lot of our canadian candy

#

like sour patch etc

#

but no ketchup chips

tardy badger
#

You can buy ketchup chips in stores here

rapid geode
#

oh

tardy badger
#

Not the same brand though

rapid geode
#

what about all dressed ruffles?

tardy badger
#

Perhaps?

rapid geode
#

ha

#

those are the sorta "unique" canadian flavours i guess

tardy badger
#

We have fun flavors like fried dill pickle flavor

rapid geode
#

we had dill pickle a long time ago.

#

i think they try things here sometiems, and then they go away

tardy badger
#

One of my personal favorite kettle style flavors is jalapeño

rapid geode
#

they have a lot if jalepeno here now. cheetos and some otherss

#

and chocolates too

#

thats getting popular

tardy badger
#

Oh nice

rapid geode
#

i dont do spice. bbq chips is too spicey

tardy badger
#

I love my spicy foods

#

I think Hot Ones YouTube show has help popularize spicy eating

rapid geode
#

yeah

#

and all the ghost pepper fad

tardy badger
#

I personally wouldn’t do like, anything hotter than a Thai chili

rapid geode
#

i grew portuguese peppers but didnt eat them. everyone says they were pretty hot

#

i think they are 50000

tardy badger
#

300k Scoville is hot enough for me

rapid geode
#

ah

#

no

#

ha

tardy badger
#

Above that it’s creeping into kink territory

rapid geode
#

yeah

#

you can make nice food with hot peppers. portuguese chicken for example. but when its just spicy for the sake of spicey i dont get it

tardy badger
#

Yeah same

#

I can also understand eating it in equatorial regions because there is an observed cooling feeling that spicy food can contribute to

rapid geode
#

huh

#

i always thought it was just a way of curing food historically

tardy badger
#

Yeah, that too

night crescent
tranquil swallow
#

is there sim software for cockroaches, something like fritzing

fickle aurora
#

As you experiment with hot sauces your tolerance will go up, so you need to reach higher to get the adrenaline rush. Anything with extracts is usually way too excessive, but things like Carolina Reaper can be really good in some hot sauces, like Bravado’s Black Garlic Carolina Reaper. That is excellent in Mac and cheese.

patent hemlock
whole plover
rapid geode
#

milky way in the uk is something entirely different

whole plover
#

Is it reallllllllly

#

I think I'll need to taste the differences, and to be thorough probably important to gather as many samples as possible

rapid geode
#

yes

#

definitely needs to examine different sizes of mars bars, probably from different shops. you know, so its a scientific sample set

#

3 of 30 cad files listed. whee. (the first ones were hard, the rest will be easily done in the morning)

tardy badger
whole plover
tardy badger
#

that would be similar to a 3 musketeers in the US

whole plover
#

Well

#

I know I know

#

😋

#

Can you ship me some eggos? I'll be your friend

tardy badger
#

I don’t buy eggos lol I usually make my own mini waffles 😬

whole plover
#

But if you could buy eggos. Would you trade them from this day to the last

#

For one chance

#

Just one chance

#

For those toaster friendly delicious treats

#

Let's start at 1000?

rapid geode
#

O_o

#

i dont like eggos much

late fulcrum
rapid geode
#

now replace hamburger with raspberry pi

#

hehe

late fulcrum
#

Amusingly, I still have a few Pis left from my last buying spree.

patent hemlock
#

i've got 3 idle right now, but that's due to Feline Interference Tests (FITs) from new kittens -- for some reason, i don't want stuff moving around on it's own with them around 😏

rapid geode
#

ha

spice moss
#

now the pink panther order and it comes sounded like much different

fleet furnace
#

I've been digging around but can't find any adafruit.com mentions of an updated and larger magtag in the works. Is that a hallucination?

unkempt meadow
#

I just received the new Memento board today. When I go to download CircuitPython for the board it only offers the Version 9.0.0 Alpha 6. Is this correct? If so any tips are welcome. I am quite new to AdaFruit. A month ago I got a Feather ESP32-S3 board that I flashed with CircuitPython 8.2.8

#

Ignore this, I am heading over to the circuitpython help group

weary fiber
#

Spent a buncha time learning C++ today

#

Came out of it with (i think) a kinda cool arduino library?

#

In use:

#

In practice:

ebon dew
#

Apparently the 3.5" TFT Featherwings were in stock today. Found out when there was 1 left. Wish I noticed earlier I would have picked up more.

late fulcrum
#

I'm hoping the ItsyBitsy M4 comes back, I build those into lots of things and I'm down to my last one.

ebon dew
#

The ItsyBitsy NRF52840 is in stock. Might be an acceptable substitute depending on what you're using it for. We all have our preferences though.

late fulcrum
#

I got badly burned by Nordic chips once, so I tend to avoid them. And I'm using the twin DACs the M4 offers, and that chip doesn't have that feature.

#

I hear Nordic has since cleaned up their act, but the whole episode left a bad taste in my mouth.

ebon dew
#

two DAC's? that does sound nice.

#

I picked up a couple adafruit S3 feathers too because the LCF battery monitor on the older ones are constantly throwing errors on my 1200 line script. I think the LCF battery monitor chips requires a certain time to load that is taking too long. a lot of ETIMEDOUT errors. hopefully the S3 with the new MAX chip battery monitors behave better.

#

yes i keep ignoring the errors. have to take a screenshot of when it happens. and it's kind of a known issue.

fair summit
#

is this with 8.2.x or 9.0.0?

ebon dew
#

oh really...

#

8.2.7

fair summit
#

yup really!

#

🙂

#

see last post

ebon dew
#

welp, i'm gonna have like 8 esp32-s3 feathers now. i'll find a use for them when more TFT featherwings come in stock 🙂

#

maybe will revisit the social media tracker but on a tft. have to rework all the request API's for 9.0 anyway.

#

i even commented on that issue. was catching the error but didn't give it a continue or pass... so of course it would stop the script.

#

i've learned a lot about exception handlers since then.

#

i'm definitely guilty of ignoring that error and just hitting reset every time 😅

fair summit
#

clock stretching did not work well on ESP-IDF 4 on S3 (S2 is fine).

#

There are still chips like BNO055 that don't work hardly at all, but they don't work on other impls too such as the i.MX micrcontrollers.

ebon dew
#

i wonder if i gave it a continue if it might retry and work or would just continually fail?

ebon dew
#

otherwise will give it a pass and work in some conditionals where battery monitoring is used.

fair summit
#

I added some code to the library to do some retries

#

but really, does seem to be mostly or all fixed in 9.0.0

#

good night, fading!

ebon dew
#

have a good night, thank you for the info!

sick apex
#

I need help

#

LMFAO

weary fiber
#

is it usual for datasheets to be marked with this on every page..?

rapid geode
#

they have that when they were made to order for some large company as a preliminary spec. And then when the product goes public they are too lazy to make a new pdf 😛

ebon dew
#

I've seen that many many times, it's definitely laziness.

patent hemlock
rapid geode
#

im in the top 5% for "your order had been delayed 6 weeks"

tardy badger
#

I have a deep appreciation for the music processing center of brain. Especially how loud rhythmic music can help calm anxiety.

rapid geode
#

music and singing is interesting cause apparently it is processed in an entirely different part of the brain as talking

tardy badger
#

Yeah, it is fascinating

rapid geode
#

according to etsy it is now midnight. what the heck timezone are they? i would understand GMT, but this is like... +9? russia? uae? shrug

rapid geode
#

i sold my rusted lathe to a university formula SAE engineering team. that sound sfun.

dusk flax
#

Random question, why is the ESP32-S3 chip so different on the Adafruit vs the Unexpected Maker boards (specifically in size)?

umbral phoenix
#

most Adafruit boards use the module, QT Py uses the chip, same (7x7mm I think) size as UM

#

there seem to be two packagings of the chip, but both are 7x7mm; modules come in 5 flavors

dusk flax
#

Ahhh. Thank you (I just got my order for a bunch of boards and didn't realize the difference between them until they were next to each other)

tardy badger
#

My brewer of morning nectar has died 🥲

rapid geode
#

O_o

#

oh

#

i thought you were talking about a person

tardy badger
rapid geode
#

ha

tardy badger
#

It served nobly for nearly 4 years, acquired at the start of the pandemic when the coffee maker before it passed from this world

#

Luckily my second in command French press keeps up when other coffee pots have failed

late fulcrum
#

I remember stories about someone telling their cow orkers "My Sun died" and being misinterpreted

#

By way of explanation for those who don't remember Sun Microsystems (now a part of Oracle)

patent hemlock
#

SPARCStation!!!!!!!!!

late fulcrum
#

I used the old "pizza box" SparcStations for many years at work and at home.

patent hemlock
#

i remember blowing the mind of a Sun Expert by hacking the boot sequence to resurrect a 420R by using a trick i learned on linux

late fulcrum
#

I worked with Sun a lot in the early days and did all sorts of interesting boot tricks for our customers (part of our license agreement was we had to furnish back to Sun any modifications we made, so some of those tricks became part of later distributions)

#

I also managed to write diagnostics for various peripherals in FORTH to run directly in OpenPROM

#

I even developed a hands-free installation procedure for the Navy, where the installer (generally the person who welded the rack to the deck) just had to put the tape in the drive, type "boot tape", press the return key, and come back in a couple of hours to a running system.

#

We asked Sun to help us write this, and they wouldn't even take our money, claiming it was impossible. So I wrote it.

patent hemlock
#

nasty boot loader tricks: i reverse-engineered the Netware 3.x bios loader to custom load some other junk to be able to talk to a custom OS/2 "server" -- same thing (the guys at Sabre were impressed as 💩 and totally useless)

late fulcrum
#

I tried tucking additional boot flags into the section of RAM allocated for them, but they disappeared when the next stage loader fired up. I eventually chased it down to a bit of ROM code that read the flags, converted them (well, the ones it recognized) to a bitfield, then regenerated the flag string later. Since my new flags weren't recognized, they got lost, and I had to find another way to persist boot information between loads.

#

We even developed our own custom SBus cards

patent hemlock
#

Thankfully did not have to go that far -- just software integrations that were not supposed to exist 😺

late fulcrum
#

Ran into a bizarre one with a SCSI floppy drive. It just didn't work. I finally chased it down to Sun's NCR SCSI driver, which would put the data on the bus, assert strobe, remove the data, and wait for ack. I switch it to assert strobe, wait for ack, THEN remove the data. Most peripherals worked fine the other way, as they apparently latched the data with the strobe signal. But the floppy drive seemed to have a microcontroller that got an interrupt from the strobe signal, then went to read the data from the bus, by which time it wasn't here any more. So it would read six bytes of all zeroes, which is a valid SCSI command ("test unit ready"), so it would respond with success. However, command like "read" confused the driver greatly, as it would expect 512 bytes of data, then status, and would be upset when it got the success but no data!

dawn terrace
#

i love your project adafruit

trim yarrow
#

Hi there! I have a Feather nRF52 Bluefruit LE - nRF52832. I’m wanting to connect a real time clock and accelerometer (to count steps) and was wondering what would be the best boards.

Looks like there might be wings, but they might more than I need. I don’t need an SD card, and I’m wanting to power the real time clock with the 3.7 lipo battery I’ll be connecting the feather to.

Here’s what I’ve found/am considering. Thoughts?

Thanks in advance!

Accelerometer

  • Adafruit Triple-Axis Accelerometer - 2/4/8g @ 14-bit - MMA8451 https://www.adafruit.com/product/2019?gad_source=1
  • Adafruit LSM6DSOX + LIS3MDL FeatherWing - Precision 9-DoF IMU Adafruit LSM6DSOX + LIS3MDL FeatherWing - Precision 9-DoF IMU : ID 4565 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Real time clock

reef jackal
#

where's the best chat room to ask for help with a light saber propmaker build?

tardy badger
night crescent
night crescent
#

10% discount code, code is: padc http://www.adafruit.com ends at midnight NYC time

urban arrow
#

OK, I've concluded that the setup I'm doing simply will not work.

I have a Metro ESP32S2 with a TFT resistive shield on top, which is all working perfectly EXCEPT I cannot access the SD card on the shield.
The shield docs say SDCS is pin #4, and this is board.D4 on a Metro M4, and I can use the SD card in a shield on the M4.
The ESP32S2 has totally different pins scheme, labeled IOxx.
My test code is below since I forgot...
I've literally tried almost every pin. It does not appear that this board even has a "pin 4", but I'm going cross-eyed studying the pinout diagram.
BTW, IO9 which I assume is the "same" pin as Board.D4 doesn't work.
https://learn.adafruit.com/adafruit-metro-esp32-s2/pinouts

Adafruit Learning System

It's Metro shaped and has an ESP32-S2 WiFi module!

royal niche
#

Hello ladies and gents. I have a question about why one practice in python would be preferable to the other. Let's say the program imports a module that keeps track of variables that should be accessible from all other modules, "variables.py". And let's say another module, like "functions.py" needs to change one of said variables. Would it be better practice to return the value to functions.py, or would it make no difference if the value is changed like this: variables.x = new_value?

#

Example:
def one_function()
new_value = 10
return new_value

or:

def one_function()
new_value = 10
variables.x = new_value

supple shale
#

my instinct would be to prefer the former

urban arrow
#

I may be wrong, but the way to define/store variables accessible to everywhere would be in a class. Then instance the class, pass values to it, and access stuff by classname.value

tranquil swallow
#

In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to a singular instance. One of the well-known "Gang of Four" design patterns, which describes how to solve recurring problems in object-oriented software, the pattern is useful when exactly one object is needed to coordinate ac...

patent hemlock
#

yes -- 40 years experience in the field is that "global variable" can bite you hard and singleton or passing a "class/struct" around is better because you can track changes to the thing

if you use a class/struct to pass information to a method, then that method should return (technically) a copy of the modified class/struct (usually the input is actually changed, but it is returned so that the caller doesn't need to "know" that it was changed)

#

the bad news is python allows you to modify the structure of classes, so you have to be careful anyway

weary fiber
#

Forgot that malloc doesn’t clear out the allocated space & accidentally visualized it all

urban arrow
#

Subject change ha ha. Had a stroke of genius (hardy har har) few weeks ago.
I have a Pico with DVI breakout board running a SMALLISH code file to display stuff on HDMI. We know it's pretty hard to run circuitpython HDMI since you run out of memory fast. Here's what I did...
An ESP32S2 with an RFM69 radio breakout attached. This queries various json's from websites, then sends simple strings to another RFM69 breakout hooked up to the Pico. Parse the string out and display stuff in labels on HDMI.
Working well and no "out of memory" yet... Bottom line, I can display live website data (weather, AIO time, NFL scores, etc.) from a Pico to a nice HDMI display using CP.
I already had all the needed stuff on hand. It's so nice when you get an idea and don't have to buy more stuff. I'm already doing my part to support Baby Ada nicely. 😀

tardy badger
#

Last work day of the year for me and it’s a struggle

#

Just 4 more hours to go 😮‍💨

rapid geode
#

dream of baking cookies

#

will make it go faster

tardy badger
#

I’ve got plans to do some serious baking the next three days. Starting tonight with prepping dough for croissants, baking some cookies, loaves of bread. Good stuff

#

Need to take my two oldest kids to the store to get presents for each other. I always have to wait because they suck at keeping secrets lol

rapid geode
#

im doing my gingerbread cats right now

tardy badger
#

Oh nice

rapid geode
#

o my it smells so good

rapid geode
#

douhg chilling. now we make peanut butter cats. mmmm

tardy badger
#

Yum

#

I love me some good peanut butter Cookies

#

I need to make gingerbread dough

#

I picked everything up the other day to make it, just gotta do it

rapid geode
#

yeha. i got a lindt bar to chop up as well. might put some in the peanut butter cookies. i want to make brown butter chocolate chunk cookies though. i dont think they can be cats, they wont hold their shape

tardy badger
#

I made some English toffee the other day and will be using the poorly shaped pieces from that for chocolate toffee cookies

rapid geode
#

yum

rapid geode
#

bah. gotta clean everything up spotless, cause my friend is alergic to peanuts. dont want to contaminate other cookies

limber dome
#

@tardy badger yeah, when I first used this channel I didn't really know how to get responses from the right people. So I tested the waters with all of the sections as well

rapid geode
#

this is the baking section

#

:x

signal parrot
#

Heyo, a quick question, is there any major difference between part nr. 5346 and part nr. 5611?

rapid geode
#

one you can buy, one you cant. im assuming one has just replaced the other

signal parrot
#

So I'm not sure

rapid geode
#

oh

#

hmm

signal parrot
#

Both are the same price too

#

:D

rapid geode
#

if you watch the new products video.... "dont you already have a 16 pin expaned? yes, but we cant get chips til 2024"

#

so there you go

signal parrot
#

But still, are there any differences in performance/usability?

#

Or are they meant to be exactly the same

rapid geode
#

chip shortages have been a big thing the last few years

#

a lot of products have swapped chips around

#

or just couldnt make the products

fair summit
signal parrot
fair summit
signal parrot
limber dome
#

Yeah I felt like I was lucky to get my GPS feather and my M0 radio boards. The 32U4s are pretty awesome also

ebon dew
#

Yeah just as I made my first huge PCB project using the MCP23017... the fact that they knew about it for a decade is really what blew my mind. I was pretty upset to say the least.

#

It's not a big deal if you don't use every single pin for input/output except my project did and there were 2 chips on ever board that were fully loaded. I never experienced the issue though so I think it might not affect every single chip or I was just using it in a way that didn't trigger the fault.

#

and still to this day I've never actually used my own TR-Cowbell to make music.... I blame Adafruit for all the shiny new things every single week that turns my head like a dog seeing a squirrel.

#

I have to finish this project... oh look at that new hardware from Adafruit... and already thinking of 3 projects to do with everything... Lady Ada is a machine.

rapid geode
#

ginger cats

rain cradle
#

Any ideas what to use async for? (doesnt have to be CPy)

I'll like to write something (ever so slightly) useful, to learn about it, as i have never really used it for anything (:

pallid orbit
rain cradle
#

I know and understand the concept

#

But you dont fully understand something until you do "complex" code with it (and run into issues)

#

Thus why i want ideas on what to do

real rampart
#

Hi - I'm trying to find some microcontroller boards with proper USB 2.0 or better speeds. I want to use a microcontroller to get video off of one of (or, preferably, two of) those 5MP camera modules, and the standard USB 1.1 you find on most boards won't do for that

#

I'm not really clear on how these MCUs cope with the uncompressed video stream at all, actually. It's that or JPEGs.

late fulcrum
#

That's going to be tricky, as you not only need USB 2.0 but you also need to support USB host mode. I'm not aware of any boards that can do so. Handling that kind of data rate would also be tough for most microcontrollers. I think that's getting into Raspberry Pi territory.

late fulcrum
# magic osprey I'm kind of digging this style of project box with a pre-cut assortment of holes...

Not quite the same thing but I saw this kit with a prepunched plastic base and it reminded me of your question. https://theelectronicgoldmine.com/products/g27600

The Electronic Goldmine

Educational project base is a sturdy 5-1/2" sq. x 1-1/8" tall base with a 2 "AA" battery holder that can be firmly mounted by "pushing in" at various points, an on/off switch that mounts the same way via a 3 quick connect wire clips. By using this base, the battery holder, switch and clips you can have a sturdy and con

urban arrow
#

Matrix Portal S3 finally back in stock yesterday, it's been weeks. My original "died", don't know why. It won't accept a bin file no matter what method I've tried like 50 times. Oh well. It was working great for months of almost constant use. Ordered another last nite. Merry Christmas!

urban arrow
# rain cradle I know and understand the concept

Tell you what I used it for and learned its usefulness. My code was polling to receive a string from RFM69 radio, and also displaying that data at regular intervals, where I was updating a 7 segment display every 4 seconds or so, and also running rainbow colors on a neopixel. async worked great doing all this.
There's no way you could run all this together without async. I learned a lot about it and still use it for other stuff.
JP recently had a simple Parsec demo with different LED's timing.

rain cradle
#

maybe read some data over WiFi + dump it on a display (i have a ton of them lol)

weary fiber
#

What would be a good chat for a quick C++/C question?

tranquil swallow
#

i read K&R a decade ago so ask away

weary fiber
#

Okay so like

#

Say I have a parent class A with some functions and member vars, and I have a derived class B with some additional member vars. B overrides some of A’s methods with additional logic which depends on B’s add’l member vars

#

Now say I do A* myobj = new B()

#

q. 1: will myobj.overridenMethod() use the extra logic I specified in B?

#

I think the answer to that one is yes

#

q. 2: myobj may be a pointer, but space for a B (and its extra members) is still allocated in RAM. Will delete(myobj) properly deallocate all of it?

#

I think the answer to q. 2 is “yes IFF class A has a virtual destructor”

#

(since typing this I've realized my understanding of C++ polymorphism is wonky and I need to learn more)

stoic mesa
#

sorry to interrupt your c++ discussion...
but I can't resist

weary fiber
#

okay, rephrased my question & it's at the bottom of this image

brittle linden
# weary fiber okay, rephrased my question & it's at the bottom of this image

This Wikipedia article discusses C++ virtual method tables. It should answer your question. https://en.wikipedia.org/wiki/Virtual_method_table

In computer programming, a virtual method table (VMT), virtual function table, virtual call table, dispatch table, vtable, or vftable is a mechanism used in a programming language to support dynamic dispatch (or run-time method binding).
Whenever a class defines a virtual function (or method), most compilers add a hidden member variable to the c...

charred path
#

i find C++ to be nice language but oh my god the whole include, extern, stuff drives me so crazy

#

i just wanna organize my code but every file has like so much confusing include, .hpp/.cpp separation boilerplate it makes me dizzy and tired

glad ruin
#

I like having declarations separate from implementation.

charred path
#

it's just so much boilerplate code

charred path
#

Looks like modules change things in C++20 but doesn't look that's an option on Arduino quite yet

rapid geode
# honest trail

here we have the cat in it's natura habitat: anywhere where you dont want him to be

rare plank
#

Thats really my Christmas “tree”

rapid geode
#

from a future where we have all forgotten what trees look like

#

i feel like there should be electronics in a cookie this size

late fulcrum
#

The cat knocked over the tree!

rapid geode
#

hahaha

dusty citrus
#

The grinch cat

uncut trench
glad ruin
#

Yes, although that would be more along the lines of benchmarking (unit tests are 'sanity checks' with no bearing on performance).

uncut trench
#

Agree 100% re performance. Unit tests can only check the correctness of a class implementation.

limpid sedge
#

unlike other parts, the fab print doesnt have hole markings

ebon dew
#

You would use a program like Eagle, import the .brd file and use a measuring tool on the hole.

limpid sedge
#

ok

ebon dew
#

or if you have the physical board, use a set of calipers to measure the hole.

limpid sedge
#

where can i find screws that are good for my pcb?

#

like where can i find the screws that are correct size, and using easyeda how do i know what screws i need?

ebon dew
#

once you know the diameter of the circle that will determine the screw size. usually M2, M2.5, or M3 sized screws.

limpid sedge
ebon dew
#

M3 is the same size as most motherboard standoffs

#

the M designation is metric

limpid sedge
#

if u know by chance

#

i know the hole is 2.032MM, how do i convert that to the M scale?

whole jacinth
#

you can look up what the clearance hole size is for standard metric threads

limpid sedge
whole jacinth
#

M14 has a thread pitch of 2mm. that's a completely different thing

limpid sedge
#

if my next hole is 120, is that off the charts?

#

would i need #4-40 for that cause its so big and not on metrics?

whole jacinth
#

120mm? in what object?

ebon dew
#

Use M2.5 screws

limpid sedge
#

the diameter u just put it to the m?

ebon dew
limpid sedge
whole jacinth
ebon dew
#

change measurement from MIL to MM

#

and at such a short distance will likely have to disable grid snap

limpid sedge
#

ok here are the dimensions of the holes i have in MM

3.175
2.032
2.286

#

I assume I would get the following for them in order
M2.5
M1.6
M2

ebon dew
limpid sedge
#

they are locked @ebon dew

whole jacinth
# ebon dew

is that the copper layer? or the actual drill diameter

limpid sedge
#

heres what I have

ebon dew
#

Drill diameter I suspect, hole size.

#

oh you're trying to actually get the drill size by selecting the hole? no, i just used the measuring tool. shortcut N on your keyboard

limpid sedge
limpid sedge
ebon dew
#

not sure if it's the correct way, it's the way i usually measure hole sizes quickly.

whole jacinth
limpid sedge
#

is buying the screws from home depot a good idea?

ebon dew
#

first click on a blank area to bring up your panel. then select milimeter as your preference unit... then select the hole.

#

hole size is 2.5mm exactly

limpid sedge
#

thats odd

#

i did the same thing, maybe different footprints?

whole jacinth
#

or different layers?

ebon dew
#

Home Depot and Lowes don't have a good selection of small metric sizes. Best place to get them would be Amazon if you want to buy in bulk or Adafruit if you want Nylon instead of metal in that size.

#

Seems you might have some layers disabled yeah it's weird.

#

I went to file>open>Eagle and selected the BNO.brd file

#

it will ask you something like do you want to keep all layers etc.. say yes.

whole jacinth
# limpid sedge

ok that's maybe top silk, which is not the layer you want to look at?

limpid sedge
#

i have a pcb in hand aswell

#

i dont have calipers

ebon dew
#

I do have different colors setup for some layers according to my preferences so it might look a little different than yours.

limpid sedge
#

and i have the PCB hols on the pcb and the ones on the adafruit i trying to screw them together

ebon dew
#

this is my normal layout. make sure you have all layers visible especially when first importing a board.

limpid sedge
ebon dew
#

the holes are not threaded holes if that's what you mean. you can put any kind of screws through it you want. M2.5 seems to be the correct hardware for those hole sizes.

limpid sedge
#

perfect

#

so rn i have the following

M2.5 - BNO
M1.6 - PICO
M2 - GPS

#

ultimate gps it is

ebon dew
#

sounds about right. the hole sizes can vary from board to board. usually with adafruit it's either M2, M2.5, or M3.

#

M3 is most convienent because it's the same size as motherboard stand offs and screws. so if you have a bag filled with extra motherboard standoffs and screws those work great with M3 sized holes.

pallid orbit
#

I don't know what it is but my motivation to work on my electronics stuff completely died in recent weeks

#

I'm hoping a spark comes back during the holiday break before work becomes 6 weeks of chaos

whole jacinth
#

if the hole is 2.5mm you probably want M2

ebon dew
#

if you create a standard "hole" using EasyEDA default settings their default is M2 which is tiny.

limpid sedge
#

if thew hole is 2.286mm?

#

m2 is good?

ebon dew
#

yes M2 would be 2.0mm

#

M2.5 is 2.5mm and so on

gloomy aurora
#

HI

ebon dew
#

there are different thread pitches too usually either coarse or fine. for using with standoffs it's almost always fine pitch. coarse pitch would be something like case fan screws.

whole jacinth
ebon dew
#

it's the diameter of the shaft. the screw head is always larger obviously but how much bigger can vary.

#

and if you get it wrong and get a screw too small you can use washers with them sometimes.

whole jacinth
#

maybe with fine pitch you can go right down to the nominal screw diameter?

ebon dew
#

yes, should fit like a glove right through

limpid sedge
#

another problem now,

    print("Latitude: {} degrees".format(gps.latitude))

with this the latitude only has 4 decimals

#

print("Longitude: {0:.6f} degrees".format(gps.longitude))

with this formating it gets 6

are the last 2 real or just made up?

ebon dew
#

coarse pitch can still work but have to wiggle it a bit. and you can force it if you need to as there is a keepout section around most holes.

limpid sedge
ebon dew
#

I mean the name of the actual hole is "MOUNTINGHOLE2.5" and it's actually 2.54mm so you get .04mm of wiggle room. M2.5 hardware will fit that hole.

whole jacinth
whole jacinth
limpid sedge
ebon dew
#

If you're using EasyEDA chances are good you're going with JLPCB and their hole sizes are exactly what they say they are.

whole jacinth
limpid sedge
whole jacinth
ebon dew
#

possible .format is built in to display 4 decimals?

#

another way to print that would be with fstrings

#
print(f"Latitude: {gps.latitude} degrees"}
print(f"Latitude: {gps.latitude:.6f} degrees"}
limpid sedge
#

thats why im wondering if its fake or real the 2 added by the adafruit stock script

whole jacinth
#

there's also the question of how many digits the GPS is giving you (with some protocols, it's some number of decimal digits)

limpid sedge
whole jacinth
ebon dew
#

go into the gps library and see if that subclass gets truncated to 4 decimals too

limpid sedge
#

i see accuracy for velocity and other things, but not for the position

ebon dew
limpid sedge
#

ah i found something

#

i guess that means 6 decimal places

whole jacinth
#

the precision of the individual fix will vary, depending on lots of things

limpid sedge
#

i did some testing in the python shellin my pc, if there are not enough decimals, it adds zeros

#

not random numbers

#

so i guess that means it is truncated by default

limpid sedge
#

like just in a variable

#

yea, i tried this code, i think the fix might not be good enough

ebon dew
#

I don't see any code truncating it. Looks like it's being returned as an index value that must = 7

whole jacinth
#

yeah, you'll want to look at the fix quality and HDOP values to figure out how good your fix is

limpid sedge
#

print(round(gps.latitude, 6))
print("Latitude: {0:.6f} degrees".format(gps.latitude))

i tried that on the pico

here is the output i get

41.XXXX
Latitude: 41.XXXXYZ degrees

whole jacinth
#

i'm pretty sure the format language uses the number after the period to mean how many digits after the decimal point

limpid sedge
#

so it appears the string formating is adding bogus numbes?

#

my horizontal dilution is 1.14 is that good?

whole jacinth
#

no, i think round counts differently than you're expecting

limpid sedge
#

does a HDOP of 1.14 make sense to yield 6 digits?

#

and if the string format digits are not bogus, how would i get them in a regular, variable call method without print?

ebon dew
#

hmm it goes into a read_into variable which does then do some math on it

whole jacinth
#

i'm not sure that there's an exact interpretation of HDOP to number of digits

ebon dew
#

minutes = data[index] % 1000000 / 10000 no idea what that would =

limpid sedge
#

how do i get that string formated behavior into a normal variable while keeping it a float?

ebon dew
#
float_string = float(latitude)
string = str(float_string)
whole jacinth
#

hm, no, i was wrong, apparently round is decimal digits after the decimal point?

limpid sedge
#

cause i just typed the 6 digit coords into google earth and its pretty accurate to my position

ebon dew
#

yeah even 6 digits will be pretty accurate

limpid sedge
#

i want to get that 6 digit number outside of a print statement, if i just do print gps.latitude in print i only get 4 digits

ebon dew
#

if you're trying to track a pet though i could see what you might want more resolution but other than that the fix provided is usually good enough.

whole jacinth
#

if you print a float without a format specifier, it defaults to a certain format, which i'm having trouble looking up exactly

ebon dew
#

latitude_string = f"{gps.latitude:.6f}"

pallid orbit
#

the printed value is manipulated into a formatted string that can be output; the original value in the variable should not change unless you do other operations on it

limpid sedge
pallid orbit
#

and if you're getting all the digits when telling it specifically to format for 6 digits then your original variable's value is already a float you want to use

ebon dew
#

if it has decimals then it's likely a float to begin with

#

As Auron said, circuit python is smart enough to self type most variables

pallid orbit
#

floats can get annoyingly long to the point of not being useful for most use cases especially with float imprecision scenarios, so print truncating it to only certain # of digits is pretty standard in a lot of languages.

ebon dew
#

what_is_this = "hello" circuit python would automatically treat that as a string

pallid orbit
#

but print is only doing that when printing because it's converting a primitive value into a string of characters to present it to the log

ebon dew
#

what_is_this = 1 would be treated as an int

limpid sedge
#

yes

#

more strange stuff

#

if i make a string as @ebon dew said, and then convert to float, and print the float, it only has 4 decimals

pallid orbit
#

why are you converting float -> string -> float

limpid sedge
whole jacinth
limpid sedge
ebon dew
#
latitude_string = f"{gps.latitude:.6f}"
print(float(latitude_string))  # this ends up with 4 decimals?
ebon dew
#

weird

limpid sedge
ebon dew
#

sounds more like circuit python defaults all floats to 4 decimals? never thought of that

#

i don't do high precision stuff so :2f is the most I normally use.

#

sounds like if you want 6 decimals then you specifically have to format any line using float with format :.6f

#

or with .format()

pallid orbit
#

I'm less familiar with python than other languages I've used, but this sounds like you're trying to convert too much and don't understand the difference between something's actual value and a formatted, parsed log output as a string 'value'

#

they are not the same

whole jacinth
#

so CircuitPython floats are only 32 bit. that's still about 7 decimal digits of precision

pallid orbit
#

you could also multiply by powers of 10 to shift the digits into more of an integer value and see what is happening too

whole jacinth
#

that's going to be misleading, because floats are binary

#

(at least in Python)

#

if you want more than about 7 significant digits (which is different than having 7 digits after the decimal), you might want to keep the degrees and minutes separate

limpid sedge
whole jacinth
# limpid sedge i need 6 sig figs yes

ok, the 6 in the .6f format string means 6 digits after the decimal point, which can be more than 6 significant figures if you have any digits in front of the decimal. so 44.XXXXYZ is 8 significant digits, possibly the last of which is exceeding the precision of the 32-bit float

whole jacinth
#

to compare:
CircuitPython

>>> f'{1.234567890123456789:.6g}'
'1.23457'
>>> f'{1.234567890123456789:.30g}'
'1.23456859588623046875'

CPython

>>> f'{1.1234567890123456789:.6g}'
'1.12346'
>>> f'{1.1234567890123456789:.30g}'
'1.12345678901234569124767403991'
limpid sedge
limpid sedge
whole jacinth
whole jacinth
#

it depends on what representation makes sense for you. if you need to do math on it, maybe you can deal with the reduced precision, or parse degrees and minutes separately, or something

limpid sedge
limpid sedge
whole jacinth
limpid sedge
whole jacinth
#

(i did learn to calculate error ellipses for GPS in school, but forgot most of the details. it was long ago, and probably multiple GPS system upgrades ago)

wheat hare
#

Hello everyone, I'm new in the chat, but I'm stuck with the code and libs.

I'm trying to read animations as bmp files and display them into a neopixel matrix, I saw all the examples that use displayio but I only have a matrix of RGB leds 16x16, so I'm looking for a way to grab the tilegrid and paste it in the matrix or maybe a way to put them in a buffer that I can consult.

I'm using a raspberry pi pico, so I'm not able to use pillow cause only have 2Mb of flash memory available.

Thanks for your help

dull kiln
#

hi, i have some question about batteries, im trying to power a esp32 and a adafruit MPL3115A2 both being pretty powerhungry (using wifi), so i want to power it with battery, i have a 550mAh 80c rating lipo battery and still it cant power the esp and the sensor. and i try to messure the ampere it delivers and for me it looks like it delivers 0.010amps, and i need 400ma. so what kind of battery do i really need? and where to get it? or how do i solve this ?

devout snow
#

01001101 01100101 01110010 01110010 01111001 00100000 00100000 01000011 01101000 01110010 01101001 01110011 01110100 01101101 01100001 01110011 00100000 01100101 01110110 01100101 01110010 01111001 01101111 01101110 01100101 00100001

late fulcrum
dull kiln
late fulcrum
#

Hmm, you may have two problems. That's a 2S (7.4V) pack, which may be too much voltage. It may also have a protection circuit that has gone to sleep so it won't deliver much power: often you can wake those up by hooking the pack to an appropriate charger for a while.

limpid sedge
#

on a similar note, im trying to power my raspi pico, USB power banks arent working cause the voltage stuff

#

what are some options? Last time i tried a battery it didnt go to well...

late fulcrum
#

I'm not sure what you mean by "cause the voltage stuff", but I'm guessing it's power banks shutting off because there wasn't enough current draw. There are two ways around that: you can get power banks that don't have the low-current shutoff, or you can add an additional load to draw enough current to keep the power bank on (this wastes power but is often the easiest approach). Using a battery does involve some more thinking, as raw battery voltage is unregulated. The Pico does have its own regulator on board, but it needs enough supply voltage to power it, and that voltage is close to what a lithium cell provides, so if it runs down a little it can drop out.

limpid sedge
#

and i checked and it burned the resistor

late fulcrum
#

Yeah, if the resistor is sized to draw much current, you need a high power resistor. How much current you actually need depends on the powerbank. 100mA is easy enough to dissipate but it's still more than an ordinary quarter watt resistor can handle (0.1A * 5V = 0.5 watt, so you'd probably want at least a 1-watt resistor). It gets more interesting if you have to draw even more power.

tardy badger
#

Decided to do the “open one present on Christmas Eve” tradition in the morning time to be able to enjoy the gift for the day. Opened one from my brother which was an AMD Radeon RX 6700 which is an upgrade from my RX 580

#

Just barely fits 😅

#

I also love that it feels like it dwarfs my mother board

patent hemlock
fair summit
# limpid sedge i need 44.XXXXYZ

also @argonblue CicuitPython floats are 30 bits: 8 bits exponent 22 bits mantissa. 2 bits are reserved for encoding that distinguishes floats, ints, and pointers. so about 5 1/2 digits of accuracy.

Basic point is not to try to parse GPS sentences with floats

glad ruin
#

Now that is a weird format.

late fulcrum
#

Map coördinates come in some deeply weird formats, including a bizarre variety of mixes between degrees/minutes/seconds and decimal.

rapid geode
#

sooo many lemonsss..

whole jacinth
astral portal
#

Merry christmas :D

lapis acorn
glad ruin
whole jacinth
vestal jay
#

Merry Christmas gus

fair summit
whole jacinth
fair summit
#

yes, if not denormalized

#

I think the "not enough significant digits" came up in a older previous GPS discussion, where it was clear that the precision wasn't good enough to extract the lat/long info if it were treated as a float

whole jacinth
#

yeah, typical NMEA format is maximum of 4 digits after the decimal for minutes, so it still works out (given that the integer part of minutes won't exceed 59)

uncut trench
# wheat hare Hello everyone, I'm new in the chat, but I'm stuck with the code and libs. I'm ...

I'd suggest either #help-with-projects or #help-with-arduino for something like this. Those channels are specifically for dealing with issues of this sort.
That said, a one sentence reply would be that you need to decode the bmp yourself into a 16 by 16 array of RGB triples, then arrange that in a single linear buffer 256 colors long, and then pass that buffer to whatever NeoPixel library you're using to drive the display you have.

ebon dew
#

If you're using circuit python then someone did come up with a way to animate sequential bmp's by converting them to binary. It's basically mBMP though I'm not sure it has an official name since there isn't a library like gifio or jpegio. The example I have runs on a TFT though. You would have to setup a matrix using framebufferio or something like that to pipe it to a LED matrix. I did not come up with the idea just a demonstration. https://github.com/DJDevon3/My_Circuit_Python_Projects/blob/main/Boards/espressif/Unexpected Maker Feather S3/4.0 ST7796S/Fast_mBMP/code.py

hasty quarry
#

The way complex numbers can just encode circuit phase and come along for the ride of solving a system is one of the most beautiful pieces of math I’ve ever seen, hands down

#

What I don't understand but think is still incredible is why a Laplace transform looks like it has the same effect as phasor form, but more generally...when the Laplace transform looks like a very real-valued thing at first glance

#

If you just work with sinusoids and use euler's formula on a capacitor for example, you get impedance 1/jwC, and a Laplace transform gives you 1/sC. I don't understand how they basically do the same thing, it's blowing my mind

glad ruin
#

Laplace is a generalized method of solving linear differential equations.

#

Things will get really entertaining when you learn that Fourier transforms are related, and that they all derive their properties from convolution.

hasty quarry
#

I have definitely not wrapped my mind around convolution

#

I hate when properties seem magical to me, it really bothers me

#

A really interesting approach at connecting Laplace to simpler concepts was Arthur Mattuck's explanation in an MIT lecture where he said a Laplace transform is basically a power series, but continuously summed rather than discretely

#

I haven't gotten to anywhere near this level "technically", I just started college but I wanna really wrap my mind around this before my computer engineer career throws it at my face

tardy badger
#

Also, everything ( ™️ ) can be represented as a Taylor Series. Wooo all those years of math to circle right back to Calc 1

#

🙃

#

Then all those years of math just to be a factory software engineer

#

By factory, I mean someone who does the same kind of software engineering as most everyone else in the firm in quite literally the most generic sense possible

rapid geode
#

merry pie day! i mean christmas

late fulcrum
#

If I recall correctly, Atari BASIC did all its math in BCD, and did all the log/trig stuff with Taylor series. Not fast at all (it took hundreds of milliseconds to compute a sine) but accurate and didn't have to approximate values like 0.1 which are trivial in BCD but a pain in binary.

glad ruin
#

Way more accurate than the x87 trig instructions, I'm sure.

uncut trench
#

Not necessarily. x87 almost certainly uses Chebychev polynomials, which converge within a certain error margin fairly quickly. Taylor series will ultimately be more accurate (obviously), but take forever to get any kind of accuracy - they converge significantly slower than a Chebychev.
https://en.wikipedia.org/wiki/Chebyshev_polynomials

glad ruin
#

It's uh... pretty bad. Also due to the need to scale the arguments it's often faster (and more accurate across different architectures) to use a full software implementation for trig functions.

#

Besides, the x87 FPU is legacy hardware at this point. SSE and AVX instructions are vastly more efficient, plus they implement IEEE-754 floating point operations correctly.

hasty quarry
#

Somebody tagged me and deleted it

uncut trench
# glad ruin It's uh... pretty bad. Also due to the need to scale the arguments it's often fa...

That's a surprise. Back in the 80's I implemented a full 1.8.23 fp library for the Z80. Not IEEE compliant by any means (+), but sufficient for what I wanted to do. I remember going to the library to look up how to do trig functions (no Internet in those days), and came across a book with what I now know are the Chebychev parameters for sin and cos.
(+) Not compliant means it had no concept of NaN or Infinity, and didn't handle denorms at all. Among otherr oversights. There were probably more.

glad ruin
#

Yeah in this case "not compliant" means that it was mostly compliant, but internally it converted everything to an 80-bit representation.

#

It is "good enough" until you have a non-Intel machine that gives you different results with the same inputs.

#

One of the most important aspects of IEEE-754 is that it defines how each operation is calculated; the idea being that different architectures all give the same results.

uncut trench
#

This caused untold problems for the team at Sony that wrote the software PS2 emulator on the PS3, because the PS3 had IEEE compliant hardware., and there were games that relied on the bugged PS2 fp implementation.

glad ruin
glad ruin
#

I mean... arguably your stupidity will be immortalized in any field, but this is especially true with hardware.

uncut trench
#

At the time the PS2 was designed, it was a decision that made sense: it saved a few gates in the FP logic, thus reducing the cost to make a PS2 by a penny or two. Nobody was even thinking of an emulator at that time, because at the time it was designed the PS2 was the newest thing going.

glad ruin
#

Yep, gone are the days of game consoles being the precursors to GPUs.

#

There were some truly cursed architectures.

crisp lantern
#

You guys know a LOT about this stuff 😮

glad ruin
#

I'm an engineer.

late fulcrum
# uncut trench Not necessarily. x87 almost certainly uses Chebychev polynomials, which converg...

There was some amusing back and forth in the advertising in the days when it was relevant. Intel pointed out the Motorola results didn't match, and said they were wrong. Motorola pointed out that both the Motorola and Intel results were approximations, not the mathematically ideal results. Intel then had the collossal hubris to claim that their wrong results were the standard and everyone should conform to them!

glad ruin
#

"We are wrong, but since we've sold more of them we are actually right."

spice moss
#

skerr what is accurate

dusty citrus
#

There isn't really (paid is fine) anything that permits to extract data out of gmaps? Their gui and api provide few results out of queries
I could make a scraper, but it's a pain

fair summit
dusty citrus
fair summit
#

well, that's their moneymaking operation, if you are trying to find businesses, so it's not something they want you to be able to extract easily. Geographic affluency data is something you might get from census data (in the US) and similar government data in other countries

dusty citrus
uncut trench
# late fulcrum There was some amusing back and forth in the advertising in the days when it was...

Having written an FP implementation from scratch, my thoughts on that are any FP implementation will be an approximation. Constants like pi and e are irrational, and cannot accurately be represented with a finite number of bits.

Floating point maths is like moving a pile of sand. Every time you do anything to it, you lose a little sand and pick up a little dirt. -- Bob Buckley, one of the profs that taught me comp sci.
Never were truer words ever spoken.

late fulcrum
glad ruin
#

Also, there is a standard (IEEE-754) that defines exactly how those approximations take place. The goal is that even completely different devices with different implementations should still return the same results.

uncut trench
#

Right. IEEE-754 at least codifies the inaccuracies, so that all compliant hardware is inaccurate in the same way. Exactly the same as the PS2 - all 9 FP units on the device (1 in the EE core, 4 each in the two VUs) were inaccurate, but all were inaccurate in the same way. And the accuracy was sufficient for what Sony's engineeers intended it to be used for: 3d rendering. Sure, one vertex of a triangle might be a pixel or two out of place on the screen, but everyone in the chip would make the same mistake, so at the end of the day, the image looked OK. That was "good enough" for Sony.

glad ruin
#

Here's a rule of thumb: if you release something with consistent but incorrect behavior, you will encounter software that depends on that behavior, and will thus malfunction if the original issue is corrected.

#

This is what happened with the x87 trig functions.

uncut trench
#

Yup. Same on the PS2. There were games that relied on the inaccurate PS2 FP that failed on the IEEE compliant PS3 FP hardware in the software emulator.

pallid orbit
rare gulch
#

Wondering if anyone has received Adabox 21 yet. I heard they're starting to ship now (or soon?)

dusk flax
#

The adabox page says they are starting to reach out. I haven't heard yet (although I'm super excited to)

arctic rivet
#

hi what happens when gnd of a battery (3s 18650) is connected to the metal frame of a lamp
the whole led/switch wires are isolated & wont short the battery
but the GND of the battery is just touching the frame

whole jacinth
#

it might be fine if it's far enough away from mains wiring. lamp frames are usually connected to earth ground through a mains plug, or floating

arctic rivet
#

& thats bcz the adaptor jack is all metal

whole jacinth
#

yeah, it's pretty common to connect the negative terminal of a voltage source to a metal chassis or enclosure, and it's usually safe (caveat: i don't know all the details of your situation, like if you're somehow generating higher voltages in this setup)

arctic rivet
urban arrow
#

Howdy. I have just in the past few days gotten httpserver to run OK on a Pico W. Finally got around to trying this project with Liz Clark' s learn guide.
I was curious and copied the code over to a Waveshare ESP32-S2-Pico, and it runs just fine. Since I'm ignorant, are there a lot of other boards besides Pico W that will run httpserver? As long as they have import wifi?

patent hemlock
#

if the board "natively" supports wifi, yes

urban arrow
#

Yay! Thanks.

tribal brook
#

Is it just me or does the pi 5 have 2 display ribbons

tribal brook
#

Is there any eta on when adafruit gets the pi 5 in?

ebon dew
#

I think there's a subtle difference in the ribbons for camera and display.

#

DSI is for display and CSI is for camera.

tribal brook
#

It looks like the ribbon ports are for both, plus the pcie ribbon port. Which I don't know what is used for yet

#

Either way, the 5 should allow me at least 3 screens if I choose, which is lucky cause I want to be able to connect this to a TV as well as 2 displays

slim shard
#

Ahh, a bottle of XKCD237.

patent hemlock
#

nuts

late fulcrum
glad ruin
#

nice

tribal brook
#

find me circuit board and dry leaves and ill buy ut

analog belfry
frosty glen
#

second tft i bought from adafruit has done this after i took the protective film off. what am i doing wrong?

tardy badger
#

I tell ya, nothing like preparing for bed and someone pounding loudly on your door and going down to find no one, then your neighbor hears the same loud pounding.

tardy badger
#

It kind of looks like you pulled the display apart exposing the back light

frosty glen
frosty glen
tardy badger
#

You’d be surprised how delicate these displays are

frosty glen
tardy badger
#

I work fairly regularly with displays like these, it happens more than you’d expect. It shouldn’t happen but sometimes that adhesive is just a wee bit stronger than anticipated

frosty glen
tardy badger
#

Have you verified the wiring?

#

Just to cover the easily fixable

frosty glen
#

yes, the display still works, its just the smear behind the screen

tardy badger
#

Did you put any pressure on the display when removing the film?

frosty glen
#

no more than i would have using it as a touch screen

tardy badger
#

Hmm not sure then

frosty glen
#

what you said makes sense, but unfortunately that will be the last screen i get from adafruit.. thank you for your time

tardy badger
#

It’s not really anything to do with Adafruit, it can happen to any display you buy. I’d trust Adafruit

frosty glen
#

i mean everything else i have bought from them is rock solid. i try to use them as much as i can even if it means spending more than what i could on amazon just to support the cause.

whole jacinth
#

is it a resistive or capacitive touch screen? i vaguely recall that resistive touch screens can be more fragile in this way

#

in any case, if it's the second instance that's done this, and you're sure you're not using excessive force to remove the film, it might be a manufacturing defect that's worth contacting their official support about

frosty glen
#

this one is resistive, the first was capacitive

#

i may do that, thank you

whole jacinth
#

i think "easy-release" adhesives sometimes get stickier than designed while in storage, unfortunately. i've noticed this with painter's tape; maybe it's also an issue with protective films on LCDs

hasty niche
#

Heat it up and maybe it'll come off easier.... Would it be possible to just leave the protective plastic on?

#

Let it prmeel off on it's own as you use it

#

I do that with all of my appliances. It is protective, after all.

limpid sedge
#

i connected my BNO085 to the pico and the yaw pitch roll works very well, super real time, but the compass heading is stuck to -34

#

idk if im calculating it wrong or there is an issue with the BNO

limpid sedge
#

here is the function im using

def compass_heading(x, y):
    # Calculate heading angle in radians
    heading_rad = math.atan2(y, x)
    
    # Convert heading angle from radians to degrees
    heading_deg = math.degrees(heading_rad)
    
    # Ensure the heading is between 0 and 360 degrees
    if heading_deg < 0:
        heading_deg += 360.0
    
    return heading_deg
patent hemlock
#

the first thing i'd check to see is if x,y are actually changing, then see if you're getting a math overflow or something

dusk flax
#

Also, make sure your x and y are actually x and based on the orientation of the BNO

#

And depending on how you plan to use it and where you live, don't forget to account for the declination (so you are pointing to true north, not magnetic north)

dusty citrus
#

obviously need to move this to a help channel, but I'm having trouble figuring out a LED cube kit (all SMD LEDs, I just screwed the components together and connected some pins) and how to get it to work with Circuit Playground. What would be the correct channel for help?

limpid sedge
dusk flax
#

I believe it's returned in [x,y,z] , since that's the aurdino struct format.

#

Or you can download the CrowdMag app

patent hemlock
# limpid sedge wdym math overflow error?

a math overflow error occurs when the data is "too big" for the number of bytes and what should be a positive number becomes negative because of 2's compliment math

limpid sedge
patent hemlock
#

debug the x,y data you get by applying the same formula on a "bigger" computer, for example

limpid sedge
limpid sedge
#

i see three numbers

dusk flax
#

you add it to the magnetic bearing/heading you caculated

limpid sedge
dusk flax
#

the return from your method compass_heading

limpid sedge
#

which of the three numbers from the website

dusk flax
#

So I get something like:

2023-12-30 15.24° E ± 0.39° changing by 0.10° W per year

#

So it would be 15.24 for where I am (Seattle, WA, USA)

limpid sedge
#

so i would add that to my return number?

dusk flax
#

so something like:

declination_adjustment = 15.24
x, y, z = sensor.magnetic()
heading = compass_heading(x, y)
true_heading = heading + declination_adjustment
limpid sedge
#

thanks!

#

ima check the x and y value and see what happens

#

and then ill do the adding

#

hopefully that solves it

dusk flax
#

👍

tame coral
#

hello

#

I have the pca9685 and the LED is red, it is hooked up to my raspberry pi 5 with vcc to 5v, with external power supply hooked up directly to the terminal blocks

errant steppe
#

I got myself a reflow hot plate, and it arrived this morning. It's outside on the balcony ramping up to 300ºC as a test.

I had the silly idea to buy a second one of these heat plates to set it outside on the balcony and just set it to like 20° all winter and see what the birds do with it. 🤣🤣🤣🐦🐦🐦❅❅❅

proud robin
#

happy new years eve

limpid sedge
#

funny enough when i run standalone it works

#

on the pico

limpid sedge
#

and also what orientation does the compass read from?

dusk flax
#

Yes you would subtract

#

And what do you mean what orientation?

limpid sedge
limpid sedge
dusk flax
#

I need to double check, but it's up to you. It would be based on the order you put x and y into atan2. So if you put y in first (which is what I see most common) y would be poingint on your heading (which on the BNO is which way the writing is printed)

limpid sedge
dusk flax
#

So this is in the orientation with ^Y pointing on your heading. >X to your right and Z straint up

limpid sedge
#

so the heading that is repoted by the function is interpreted as in the direction of the Y arrow?

limpid sedge
#

should i maybe try to calibrate?

dusk flax
#

The BNO self calibrates to an extent. Are you using it away from any other magnets? And is that 150° with or without the declination adjustment?

limpid sedge
#

the blue thing is ultimate GPS

limpid sedge
dusk flax
#

is it off when you are holding it like that?

#

or rotated 90° counter-clockwise?

limpid sedge
#

its off when resting on table

dusk flax
#

so the heading would be in the direction from the BNO and across the GPS. Is that what you were using?

limpid sedge
#

that way right?

dusk flax
#

yes

#

assuming you are doing atan2(y,x) with x,y,z = sensor.magnetic()

tardy badger
#

To all the folks here on the other side of the international date line, happy new year! 🎆🎊🎈

dusk flax
#

@limpid sedge I would work through calibration. I would also take readings at 90° rotations to see if they are 90° apart

limpid sedge
#

the calibration script in the repo is correct right?

#

and if so is there a orientation i need to have while using it?

dusk flax
#

I believe it's the same way you do on your phone. Orientation doesn't matter, just the different twisting motions

limpid sedge
#

i cant seem to find it in the script

dusk flax
#

same for your phone. rotation around each axis

limpid sedge
#

i got an error though while doing it though

limpid sedge
#

nvm so i figured it out, but so when it said hit s to save, i got didnt find packet end

dusk flax
#

I'm not currently next to all my devices and sensors so can't dig into that right now

limpid sedge
dusk flax
#

You can also just put this in your script:

while bno.calibration_status < 2:
  time.sleep(0.1)
  print("Magnetometer:")
  print("X: %0.6f  Y: %0.6f Z: %0.6f uT" % (mag_x, mag_y, mag_z))
  print("")
print("calibration done")

And then calculate the orientation. The values won't be saved, but it will still be calibrated

limpid sedge
#

doesnt it need to be savced to work?

dusk flax
#

so when it saves it, it has the offsets at startup

#

right now the saved offsets are just 0

#

I always re-calculate, since my devices are always moving around

limpid sedge
#

does that mean if the code ran upto that part before the save and it said high accuracy, its calibrated?

#

so i should add that bart to the main script?

dusk flax
#

I would add that part to your script, at least for now

limpid sedge
dusk flax
#

With the goal of getting an accurate reading

limpid sedge
dusk flax
#

Builds offset data to adjust the values it returns. It helps calibrate for the magnetic field where you are

limpid sedge
#

also while using the adafruit heading script, i get completly different values to the one i had earlier

#

and those numbers are accurate within 3 degrees,

#

the script returns rotation vector heading and geomagnetic one, the one without geomagnetic is more accurate

#

the geomagnetic one is off and pointing off ~45 degrees diagnal the accurate one

dusk flax
#

The rotational one (I believe) is based on the direction it's facing when it powers on

limpid sedge
#

non geomagnetic?

dusk flax
#

Yes

limpid sedge
limpid sedge
dusk flax
#

I would need to double check the docs.

limpid sedge
#

overall, it seems to be a common theme of issue with magnetic atributes, geomagnetric rotation has issues, the heading from magnemoter has issues

dusk flax
#

Is it possible you are in a place with too much interference?

limpid sedge
#

@dusk flax what causes interference?

dusk flax
#

Magnets, high power, iron

limpid sedge
#

standard peripherals

dusk flax
#

Is it easy to test outside?

limpid sedge
#

by a window yes,

#

actully outside, unfortunetly no

dusk flax
#

I have a friend that struggled forever because he was in a basement, which was concrete, which was full of rebar, and he didn't realize.

#

Did you test different values at 90° offsets?

limpid sedge
#

yea

#

inaccurate

dusk flax
#

And were they ~90° different?

limpid sedge
#

yea

#

might be able to head outside as long as internet reaches that far

#

wait one

#

so just before i head outside, here is what i have

#
import math
import busio
import board
import time
from adafruit_bno08x import BNO_REPORT_MAGNETOMETER

from adafruit_bno08x.uart import BNO08X_UART

imu_uart = busio.UART(board.GP0, board.GP1, baudrate=3000000, receiver_buffer_size=2048)

bno = BNO08X_UART(imu_uart)
bno.enable_feature(BNO_REPORT_MAGNETOMETER)

def compass_heading(x, y, declination_adjustment):
    # Calculate heading angle in radians
    heading_rad = math.atan2(y, x)
    
    # Convert heading angle from radians to degrees
    heading_deg = math.degrees(heading_rad)
    
    # Ensure the heading is between 0 and 360 degrees
    if heading_deg < 0:
        heading_deg += 360.0
    
    return heading_deg + declination_adjustment

while bno.calibration_status < 2:
    time.sleep(0.1)
    print("Magnetometer:")
    print("X: %0.6f  Y: %0.6f Z: %0.6f uT" % (mag_x, mag_y, mag_z))
    print("")
print("calibration done")

while True:
    mag_x, mag_y, mag_z = bno.magnetic  # pylint:disable=no-member
    current_compass_heading = compass_heading(mag_x, mag_y, -12.91)
    print(current_compass_heading)
    time.sleep(0.1)

#

and also, when i go outside i will be powering it with a lithium battery, does that cause interference? like one of those phone charging ones

dusk flax
#

Shouldn't. Same thing that's in your phone and that works fine

limpid sedge
#

alright im heading out

dusk flax
#

Also, I see a qt cable in your photo. Are you not using i2c?

limpid sedge
#

whenever i try to use i2c i get errors

#

so i have the qt cable as a connection, and then have the pin shorted to get it in UART

#

just got back from outside, same issue, ~45-60 degrees off

dusk flax
#

By shorted, you have power (pulled high) to p1?

limpid sedge
dusk flax
#

I wonder if you have a bad board. If you add the error to the declination adjustment, is it then accurate?

#

And where (roughly) in the world are you?

limpid sedge
limpid sedge
#

its not a consistant error

limpid sedge
dusk flax
#

So they do mention that board has issues with i2c. I just wanted to make sure since I saw the cable

#

I use the older but similar bno055

limpid sedge
#

ok yea

#

very similar

limpid sedge
dusk flax
#

The only thing I might try is removing it from the board and trying it lose. Making sure there's not a bad connection

limpid sedge
dusk flax
#

Ahhh

#

And maybe try enabling the accelerometer to see how those values look. Since gravity is straight down. Easy to see if values are strange

limpid sedge
#

i am getting these numbers for it

#

9.91016 -0.863281 -0.996094
x,y,z

eyeballing, they appear to vector sum to 9.8

dusk flax
#

Hmmm

#

So that's saying gravity is pushing down on x

#

Is that it laying flat?

limpid sedge
dusk flax
#

Okay, what do you get for heading if you pass in y and z

limpid sedge
dusk flax
#

Sure. It doesn't matter yet.

#

If it's backwards you would be 90° off

limpid sedge
#

in the compass heading function?

dusk flax
#

Yes

limpid sedge
#

there almost identical

#

sometimes they are different, but they are nearly identical

#

funny enough though, when i rotate the board over, the yz one becomes accurate ish though

dusk flax
#

Identical to what it is with x and y?

limpid sedge
#

close ish

#

now though, the headings do change by 90 when i rotate the board

#

90 degrees

dusk flax
#

How far off is it? And if you swap the order of y and z is it accurate then?

limpid sedge
#

with z,y its 90 off

#

y,z same

#

if i do x,y in the original function, its +- 3 degrees!!!

#

appears the calibration + switching it works well!

#

also what does it take to go from medium to high calibration?