Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ToxicFrog
Apr 26, 2008


Nearly a year after moving, I finally found the box I packed all my electronics parts into, including three Arduinos in various form factors (one of which I'm pretty sure is dead following an incident with the bathroom sink, oh well) and and two NTC CHIPs, which are ARMv7 based single-board linux machines, kind of like stripped down RPi2s.

Unlike the Pi2, they have integrated wifi, so I'm considering setting them up as remote indoor temperature sensors -- probably one in the basement near the spider enclosures, and one upstairs somewhere. Since they run linux I can just install munin-node on them and integrate them into my overall monitoring network, without needing to figure out how to write a munin node implementation on an arduino or something.

Anyone else here used the CHIP for anything?

Adbot
ADBOT LOVES YOU

ToxicFrog
Apr 26, 2008


Just did my first experiment with CircuitPython (on a Gemma M0, reading a 3-axis magnetometer over I²C and changing the colour of an LED based on it) and goddamn, this is really, really nice. Pretends to be a USB mass storage device when plugged in, so you don't even have a separate flashing step, just edit the python code directly on the device and reboot it. Gives you a serial console (with repl!) on /dev/ttyUSB0. And the Gemma even has a tiny RGBLED surface mounted to it so I could quickly hack something together using it before getting out the neopixel strips.

I had to write my own HMC5883L driver to talk to the sensor, but even with that this is a much nicer UX than loving around with the Arduino tooling.

ToxicFrog
Apr 26, 2008


namlosh posted:

So, I have a question regarding programming the fuses/bootloader etc of ATMEGA chips.

I want to be able to run them without a crystal... I've heard that the internal crystal sucks. What really are the ramifications of this? Like, I won't be able to listen to the chip in Serial monitor? I have to default to a slower baud rate? I won't be able to program it anymore? Everything on these chips uses Serial doesn't it, even ICSP?

You can't run the chip without some sort of clock. The default fuse settings use an internal RC oscillator, which is not crystal-based -- it's a little ball of resistors and capacitors that produce a sine wave when powered. Fiddling with the fuses is done when you want to run the chip off an externally connected crystal oscillator, the clock-out pin of another microcontroller, or the like. Most (all?) arduinos have a crystal oscillator on the board and are pre-fused to use it, but "naked" atmega chips out of the box won't be.

Don't know about the programming aspect, but I suspect that even for an arduino you'll need an external programmer (although if you have a spare usb-programmable board like an arduino lying around you can turn it into the programmer and use it to re-fuse the rest, IIRC).

ToxicFrog
Apr 26, 2008


So my partner is getting into Arduining, and since they didn't really get an education in electrical circuit basics as a kid they're reading through the tutorials on the Arduino site.

In general they're finding that the Arduino documentation tends to assume way more electrical knowledge and way less programming knowledge than they already have, which isn't great in general, but also a lot of the tutorials look like this:

Guide to 3V3 and 5V power supplies posted:

Sometimes the electronic device, that should receive 3.3V level of input from the supply may receive a "dirty" tension. This causes the electronic device to suffer abnormal electronic behaviour. As it could destabilise the system completely or change the logic forcefully due to changed logic range to be unrecognised. There are more of this undesired behaviour, if over-voltage or over-current is introduced to the system.

So for this matter, how do we protect the system? The solution can be based of the proper Reverse Polarity Protection showed previously. The proper Polarity Reverse Polarith Protection implements a bidirectional Transient Voltage Suppressor while adding the P-Channel MOSFET with a zenerdiode and two resistors to get all its flavours.
Which has me wondering if this is even the correct site or if docs.arduino.cc is the user-generated-content slop bucket or something.

ToxicFrog
Apr 26, 2008


Deadite posted:

And does anywhere else sell these? The best shipping date they can give me is October 31st, and I was hoping this sign would be ready for Halloween

If you're in Canada, PiShop carries various FET switchboards, e.g. https://pishop.ca/products/mosfetti

In the US, maybe Sparkfun?

Adbot
ADBOT LOVES YOU

ToxicFrog
Apr 26, 2008


wolrah posted:

Except when there was logic on the stick, which was not uncommon in the late '90s where USB was not even widespread much less universal but people still wanted to have more than four buttons and four axes, like for example a lot of the Microsoft Sidewinder products: https://github.com/MaZderMind/SidewinderInterface

They use the fact that the analog axes produce a pulse when read by the host to signal a request for data and then the controller responds with a clock signal on the button 1 line and serial data on button 2 which makes it work kinda like the NES/SNES. I have a Saitek gamepad from the early 2000s that's pretty much a PSX dual analog knockoff and supports game port as well as USB presumably through a similar trick.

For a while I had a joystick that used normal gameport nonsense for the stick proper (2 axes + 4 buttons), but also let you map the base buttons to arbitrary sequences of keystrokes.

How did they do it? Well, there's a PS/2 in port on the joystick itself, and the joystick cable splits into gameport and PS/2 connectors, so you plug your keyboard into the joystick and the joystick pretends to also be a keyboard sometimes. To add new bindings you hold down the remap button, then press the button you want to remap, then type on the keyboard, then release the remap button.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply