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
cruft
Oct 25, 2007

I need to be grumpy about something for just a second here.

This person is making their code available for download, as a word processor document. I just don't even understand how someone could get to a place where they would do such a thing.

Thanks for coming to my TED talk.

Adbot
ADBOT LOVES YOU

cruft
Oct 25, 2007

I mean I write stuff in vi sometimes. you just need to be mindful of your formatting. But I've also been doing this since vi was the only option.

The main thing is, don't use Microsoft Word.

cruft
Oct 25, 2007

CarForumPoster posted:

Unless you're doing this cause you had to SSH into something, I bet your code has mad squiggles bro

Mmkay.

cruft
Oct 25, 2007

Okay help me out here. I'm using a Seeeduino Xiao (SAMD21 Cortex M0) with Adafruit's FreeTouch library. It works great, as long as I'm only touching one pad. If I touch one pad, then a second one, it sees me releasing the first.

If I have Cruft Jr touch one pad, and then I touch a second one, it thinks both pads are touched.

I figure this is some analog electronics thing that my computer science brain is going to have a lot of trouble understanding. Like, maybe I need to specify some of the additional arguments to the Adafruit_FreeTouch constructor, instead of just the pin?

cruft
Oct 25, 2007

babyeatingpsychopath posted:

Their example sketch specifies additional arguments to the constructor, so probably?

Everything is based on capacitance, and Cruft Jr has less skin surface area, so has a different capacitance; it checks out.

Well, at least somebody else is saying "who knows, gently caress around with the arguments until it works".

cruft
Oct 25, 2007

Fanged Lawn Wormy posted:

Am I missing some dumb obvious thing?

You have a single pin going out and you want to know if it's being driven, right? Is the display using the same voltage source as the arduino? If not, you don't have a circuit on that output pin.

cruft
Oct 25, 2007

Fanged Lawn Wormy posted:

yep, grounds are tied together.
But I'm even at a point where I'm just sitting with no external hardware, and a wire to jump ground to the input pin on the MCU, using the internal pullup resistors, and triggers when the input isn't being touched to ground at all.

I'm guessing the issue here is that you're using a circuit designed to probe a switch, and trying to probe something that generates voltage. I don't know enough about electronics to explain why this is happening, but my guess is you're "backfeeding" whatever on the display provides the voltage out. You may even be charging a capacitor.

You probably need a transistor somewhere.

Somebody else who's not an idiot about such things should chime in now :)


e: Wait, wait, wait. You have nothing at all connected to the Metro, and a pin configured as a pullup, and it reads low occasionally? Like, the display isn't even in the same room? What is FROM_BS? How is reading defined? Can you paste the entire program?

cruft fucked around with this message at 23:01 on May 26, 2022

cruft
Oct 25, 2007

Fanged Lawn Wormy posted:

if (reading == LOW); <<<<<<<<<THAT SEMICOLON

I am laughing at you right now. Definitely not laughing in sympathy because I can relate, having done this exact thing dozens of times myself. 100% a "ha ha you fool" kind of laugh.

cruft
Oct 25, 2007

PBCrunch posted:

I want to use a Raspberry Pi Pico acting like a USB keyboard to set the system volume to absolute levels (like 0%, 20%, 40%, 60%, 80%, 100%). I don't really want to just do volume up/down. Ideally this device would work with Windows and Linux. Is it possible to send an absolute volume level via USB HID?

Not with a keyboard: keyboards send "key down" and "key up" events. And there's no guarantee how the computer is going to handle "volume up": does that mean increase by 3%? 5%? 10%?

There are other USB HID devices that could do this, but you'd need something on the other end to listen.

cruft
Oct 25, 2007

ante posted:

Yeah, that seems like a decent beginner project.


I'm not sure what the most recommended keyboard HID capable Arduino is lately. Maybe the Teensy? First step would just be picking up one of those and then getting it to simulate keyboard inputs.

Agreed that this is a great first project.

For this project, for an absolute beginner, I recommend starting with a genuine Arduino Leonardo or Arduino Micro. It will do USB junk, and works with everything.

My recommendation for programming it, for absolute beginners, is Arduino Create, which runs in the browser and even works on a Chromebook.

cruft
Oct 25, 2007

Lichtenstein posted:

One aspect I'm a little unsure of is what would I need to have an input USB and output USB working at the same time. From what I've gathered, due to USB hosts being a bit tricky, the options here are either Due or any of the other USB-friendly models with an added USB host shield?

Oh. Yeah.

You can't be a USB host and a USB client at the same time on the same cable. You'll need two USB endpoint devices.

My recommendation here is to just get some off-the-shelf USB to MIDI adapter, and run those pins into header pins on the Arduino, using the normal MIDI serial communications. I don't have any experience with a "USB host shield" but my hot take is that USB is a very complicated protocol, and juggling all the libraries to do this on a single device is going to be challenging. Might be a good milestone for the second version, after you get the first one working.

That's what I'd do, anyway.

cruft
Oct 25, 2007

Lichtenstein posted:

I do have an option to use either USB or proper MIDI cable for input - and I reflectively assumed the former to be more hassle-free, but that's probably just PC habits. Though if you think about it, it's really just needlessly adding a middleman, isn't it?

Once you strip off all the USB stuff, the MIDI protocol over USB is (almost) exactly the same as the normal MIDI protocol. Many modern MIDI devices don't have a DIN-9 MIDI output jack, though: they only have USB.

It's not silly to want to consider a USB in and a USB out. It's just that, for this application, I think you're going to have a much easier time if you start out with an old school MIDI jack, and then put a pre-built USB-MIDI adapter on it if you need one.

cruft
Oct 25, 2007

I'm sure somebody in here has experience wiring up WS2812B LEDs.

I need to make a portable cylinder, 8-10 feet tall, with at least 4 runs of LEDs going down it. It needs to be packable, and not look awful. It's going to be used at a conference so it needs to stand up to some level of curious people touching it.

I'm currently thinking of using a lighting stand with a custom-made metal triangle mounted on the top, then draping black polyester fabric down the sides to the legs of the stand, and running WS2812B strands down it. The triangle would need to mount on the holes at the top of the lighting stand.

The Arduino and beefy PSU would get tied to the pole in the center with a bungee cord.

This is pretty similar to your standard christmas tree lighting thing, except I need to provide the tree.

I'm wondering if the combined expertise of the Arduino thread has enough experience making junk similar to this that they'd have some advice?

cruft
Oct 25, 2007

shame on an IGA posted:

whats the diameter

I don't know yet, depends on how it's built. If I use the lighting tree, that's probably 3 feet diameter, maybe 4.

cruft
Oct 25, 2007

Foxfire_ posted:

A SK9822 or APA102 strip is easier to control. It has a separate clock line and uses normal SPI instead of a single data line that needs specific bit times

Heh, okay. The code's already written though, I just need to build the structure :)

cruft
Oct 25, 2007

Foxfire_ posted:

Do you have mspaint scribble, or a picture of a standard christmas tree lighting thing? Hard to picture what you mean

Picture a tree trunk with strands of lights falling down it. Here's an ascii art version:

pre:
 _____
|  |  |
|  |  |
|  |  |
|  |  |
|  |  |
 _____
It doesn't need to be round, it can be a triangular prism, maybe even a monolith shape. It just needs to be tall, and difficult to tip over.

babyeatingpsychopath posted:

I'm not sure what your question is? How to wire power? How to wire data? How to build it out of metal/plastic/wood/fiberglass?

Yeah, I didn't actually state what I need help with, sorry.

I need advice on:

  • How to construct the thing so it can be packed into a suitcase
  • How to make it somewhat durable

So far a light tree with fabric seems like the best idea I've had, but I'm really bad at physical design and maybe this is an awful idea. I'm hoping someone in this thread has done enough larger-scale designs that they have some advice. Maybe this isn't the right thread, either; I didn't find one that looked more appropriate, other than maybe cosplay.

Thanks :)

cruft
Oct 25, 2007


I feel like an idiot for not thinking of this right away. Building a rectangular prism out of PVC seems like the obvious solution. Built on its side and then erected, PVC should pack up pretty nicely. I can get some sort of thick plastic bags to fill with water once we've arrived, and use those to weigh it down. Maybe throw in some nylon rope to use as guy wires to keep it rigid.

pre:
        _______________________________
       -/             -/             -/
     - /            - /            - / 
   -______________-__/___________-  /  
  /  -           /  -           /  -
 / -            / -            / -
/-_____________/-_____________/-
Good advice on the pads ripping off. I've actually had this happen in a few projects too, now that I'm thinking of it. I might also 3D print some sort of case for the end of the strip with the connection in it, to prevent it flexing and potentially popping off a pad, or get some hot tips from my textile pals on how I can sew the strips in such a way that the flex happens inside the wire instead of at the solder junction.

Thanks!

cruft
Oct 25, 2007

namlosh posted:

That’s what I thought! Lol

But evidently pushing it in macOS or Linux can cause it to overwrite the boot loader with crap…

Not entirely sure what you mean but I've set fuses / programmed dozens of Atmel chips with avrdude from Linux using that same type of USB programmer, and I've never had a problem. So I sort of doubt the operating system is the issue.

E: I guess I ought to point out that if you're doing things at this level, you might be ready to stop using the Arduino IDE / bootloader, and just run gcc and avrdude yourself. It'll free up some space in the memory of the chip that would otherwise be taken by the bootloader.

EE: unless you're trying to update the firmware on your USBTiny? Sorry for the spam if that's the case. Brain's still fuzzy from COVID.

cruft fucked around with this message at 19:58 on Jul 12, 2022

cruft
Oct 25, 2007

Foxfire_ posted:


(One deep)

drat there are a lot of smart people in this thread. I was all excited to write up a very nerdy explanation of how Interrupts work, and then read that Foxfire_ had already done it.

cruft
Oct 25, 2007

I appear to have settled on the SAMD21, initially in the form of the Seeeduino XIAO M0 and now the Adafruit QT Py M0.

It feels like I can finally expect some stability for a couple years and that's a nice feeling.

cruft
Oct 25, 2007

Deviant posted:

can anyone tell me what kind of arduino board this project i've inherited is? the previous owner did a number on it, and i'd like to try to talk to it via usb, but i can't seem to identify it or get it going in the arduino IDE




looks like usb micro-b, 5v, gnd, vin, and P0-P5 broken out

That looks a lot like a knockoff DigiSpark.



They're like $3 each. I've used them in stuff that I need to make, like, 20 of, for rock-bottom prices.

Do yourself a favor and replace it with something you're more familiar with. It's not worth your time to fiddle around with a crappy knock-off of a thing that's already as low-cost as possible.

e: I'm personally a huge fan of the Adafruit QT Py M0 and the Seeeduino XIAO M0. You probably have your own favorite that you can use to run the Adafruit DotStar Grid.

cruft fucked around with this message at 19:56 on Jan 21, 2023

cruft
Oct 25, 2007

Deviant posted:

it's already covered in glue and soldered up properly, and it was working, but the software on it seems to have gotten blowed up. i just need to know how to talk to it.

But yes, that looks right.

It doesn't seem to show up in device manager when i hook the usb to my pc, but the dotstar does light up so it's doing _something_.

Ah, yeah, and it's probably a perfect fit for that 3d-printed part, too.

The DigiSpark uses an ATTiny85 which for years nobody thought could speak USB because it wasn't built for that kind of precision timing. But then somebody hacked it to actually speak USB, and then we got the DigiSpark.

But because there's no dedicated USB circuitry, it means the ATTiny85 only speaks USB in certain conditions which preclude running the program to make your grid blink. There's some fancy trick you have to do in order to get it into "bootstrap" mode where it will actually show up as a USB device you can program. You'll have to grub around on the Internet to find instructions for triggering that mode.

Worst case, you'll just need a $3 replacement.

cruft
Oct 25, 2007

Deviant posted:

I'm gonna try the XIAO, it seems to do what i need, as long as i rewrite the EEPROM calls to use flash and don't hammer too many write cycles.

I'm a big fan of the XIAO, although lately I'm transitioning to the Adafruit QT Py M0, which is basically a XIAO with a reset button, built-in Neopixel, and a Stemma connector.

I just put in my very first ever order for a PCB. Wish me luck! :ohdear:

cruft
Oct 25, 2007

Deviant posted:

I'm gonna try the XIAO, it seems to do what i need, as long as i rewrite the EEPROM calls to use flash and don't hammer too many write cycles.

Hey, Deviant, I'd be happy to provide some FREE CONSULTATION here. What are you doing that requires writes? There's probably a clever way to either reduce how many you need to do, or spread them across multiple locations so you can do way more before failure.

cruft
Oct 25, 2007

Ethics_Gradient posted:

Hoping to get some help on this Arduino Nano based timer I'm setting up for my darkroom:

Trigger warning: I am a complete beginner and did maybe 6-8 hours worth of tutorials at some point last year and started putting this thing together, but lost much of my original code (and largely forgot what I was doing). This sketch is what I can piece together from what I had saved, and what I've copied from example sketches and modified (probably crudely) through trial and error to do roughly what I want it to.

After an afternoon's work it's actually semi functional which I'm pleasantly surprised by, but there are a few refinements that I'd like to add.

Basically you push the button on Pin 2, it lights up a red LED for 3 seconds and delays the start of the timer (this is to give you time to pick up the developer to pour). I had thought about a foot switch to start it off so you could already have the developer in hand, but it wouldn't work well for the space and adds needless complexity.

When the red LED turns off that's when the 15s timer starts, the speaker does a little click each second to help you keep time (I wanted to have the number display for reference purposes, but it's better to be looking at the image developing rather numbers for the most part).

When 15s is up the speaker is meant to switch to a double-click (if you under exposed your shot that means you need to overdevelop to compensate, but just want to be aware once I've gone over so I can adjust the next exposure accordinfly), I did this by halving the delay between setting the pin low/high. It also turns the LED back on to further reinforce that You're In The Danger Zone.

Based on this description and your comments in the code, here's how I would have written it. Please note I didn't try to compile this, it probably has bugs. But maybe it helps give you an idea?

code:
/***************************************************
 [Adafruit text]
 ****************************************************/
#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc.
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"

Adafruit_7segment matrix = Adafruit_7segment();

const int BUTTON_15S = 2;
const int BUTTON_180S = 3;
const int LED = 11;
const int SPEAKER = 12;

void setup() {
  Serial.begin(9600);
  Serial.println("7 Segment Backpack Test");
  matrix.begin(0x70);

  pinMode(BUTTON_15S, INPUT_PULLUP); //set pin 2 to input for 15s pushbutton
  pinMode(BUTTON_180S, INPUT_PULLUP); //set pin 3 to input for 180s pushbutton
  pinMode(LED, OUTPUT); //set up the LED on Pin 11
  pinMode(SPEAKER, OUTPUT); //set pin 12 to output for speaker
}

void loop() {
  if (digitalRead(BUTTON_15S) == LOW) {
    runTimer(15);
  } else if (digitalRead(BUTTON_180S) == LOW) {
    runTimer(180);
  }
}

void runTimer(int seconds) {
  Serial.println("15 second button pressed");
  digitalWrite(LED,HIGH);   //set pin 8 HIGH, turning on LED
  delay(3000);          //delay 3000 milliseconds so I can reach for developer
  digitalWrite(LED,LOW);    //set pin 8 LOW, turning off LED

  for (int j = 0; j < seconds; j++) { // Do this seconds times:
    tone(SPEAKER, 440, 125); // Play A4 for 1/8 of a second
    matrix.println(j+1);
    matrix.writeDisplay();
    delay(1000); // Wait 1 second
  }

  digitalWrite(LED, HIGH); // Turn the LED back on
  for (int j = 0; j < 10; j++) { // Do this 10 times:
    tone(SPEAKER, 440, 125); // Beep
    delay(500); // Wait 1/2 second
  }
  digitalWrite(LED, LOW); // Back off
}
If you want a button to reset the whole thing, it might be easier to find a reset pin on your Arduino and wire that to ground (or VCC, whichever it needs). Otherwise I can help you write reeentrant code that polls for the reset button, but that's high wizardry.

cruft
Oct 25, 2007

Deviant posted:

So this is a reimplementation of a friend's project, but at the end of the day:
I have a xiao hooked up to an 8x8 Dotstar rgb matrix, and i have been sending it emoji images in the form

[#, #, #, #, #, #, #, #,
#, #, #, #, #, #, #, #,
#, #, #, #, #, #, #, #,
#, #, #, #, #, #, #, #,
#, #, #, #, #, #, #, #,
#, #, #, #, #, #, #, #,
#, #, #, #, #, #, #, #]

where # is a color value, and the code has maybe 10-20 of these images embedded into it any given time.

so images[0] might be a smiley face, images[1] might be a frowny face, and so on.

And I wanted to be able to choose any of these images as well as retain state through power-off/on. Currently this is accompplished by a looping integer stored into powerCount and at runtime it just grabs images[powerCount] and sends it to the RGB, then iterates powerCount by one and writes to save position, looping powerCount when reaching end of images[]

So essentially, the current way to cycle throug images is to repeatedly power cycle until you get where you want, not elegant but functional without any additional wiring.

i'm open to suggestions, but as it stands i'm doing a single flash write on every power up to iterate where i am in the list of images.

Okay, sure. I'm assuming you already consider the obvious solution of attaching a pushbutton (cycle through emoji) or potentiometer (dial in emoji) :)

If you have 20 images, you can get 20x the lifespan on your board by using 20 EEPROM slots to store the state. At startup, loop over them, and whichever one has the highest value in it, that's the emoji you display. Then you write whatever the highest value is into the next slot, or bump what "highest value" means if you're already displaying the last one. You'll need a little logic to deal with overflow (when your storage unit runs out of bits) but that shouldn't be too tough. Let me know if you'd like me to whip out a prototype of this code :)

The advantage here is that when you cycle through 20 images, you're spreading the writes evenly across 20 positions.

It might be easier to just run the code you have until failure, and then swap out the board. Unless you're doing lots of writes per day, every day, you're probably unlikely to wear it out that quickly.

cruft
Oct 25, 2007

Deviant posted:

More likely I'll just use the flash.write() library and hope that by the time the flash storage starts to go i can just buy a new board or will have gotten bored of the project, but I'm willing to take a look at something more refined.

To help you decide, I've done some arithmetic!

The flash in the SAMD21 chip used on the XIAO M4 has an endurance of 10,000 r/w cycles. If you do one read and one write per boot, that's 5,000 cycles you can do. With 20 emoji, that's 250 cycles through all 20. So if you cycle through them all once a day, you get a little over half a year.

Bear in mind that when you wear out a storage slot, you can just upload a new program to use the next one instead. And you can keep doing that for dozens of wear-cycles.

I'm not sure how often you're cycling emoji, but at $7 for a new XIAO, it may very well be a better use of your time and money to just use what you've got and replace it when it wears out. The average case would probably not involve cycling through all 20, so you're likely to get more like 300+ "uses" of this gadget before you have to re-upload the program, and with just 10 flash storage slots, you're looking at 7+ years of changing the emoji every day before you would need to drop another $7 on a new XIAO.

cruft
Oct 25, 2007

Splode posted:

Even if you don't have room for a button, you might be able to do something cute with a touch button. I am pretty sure the SAMD21 has touch stuff built in, and then you only need a pad somewhere (it can even be part of the housing). I haven't looked at your build though so this might not be that practical.

You're right! Many of the pins on the XIAO are hooked up to the QTouch inputs on the SAMD21. I've found them to be an undocumented pain in the rear end if you want more than one pressed at the same time, but for this application, that might be a great option. You could just wire it up to a screw or something. Touch the screw, advance the emoji.

cruft
Oct 25, 2007

Ethics_Gradient posted:

You monster, that worked perfectly the first time I compiled it! And I'm feeling real dumb not noticing the "RST" pin right between two other ones I'm using :doh: All I had to do was move the pin from D3 over to there and now I've got an external reset button, nice.

Taking Cojawfee's advice I added in the beeps using some if else statements, which is also working well (once I figured out where it logically ought to go). I deleted the 1s delay and used the delay between LED flashes for that purpose instead.

I also added a solid tone to the 3s delay at the start just as a non-visual cue.

I think the only thing I'm missing is having it keep counting past 15 (so you know how much you had to overdevelop). I've tried quite a few different combinations/moving things around but best I can get is to have it leap from 15 straight to 90. (edit: nevermind, I eventually got it! Definitely understand the code a lot better after sitting down and puzzling through it, a lot of the stuff I learned a year ago is coming back to me)

If either you guys want a print, let me know your mailing address by PM :kiddo:

edit: another question - am I safe plugging in a strip of 60 5V (4W, according to the manufacturer) LEDs to replace the single one I have on D11? Just tried it and it worked fine, but wasn't sure about long term. They're pretty dainty.

I didn't mean to hand you a fully working program, sorry. I was hoping it'd be broken and you could learn by fixing it. But it sounds like you learned by adding stuff to it, so that's great. Hopefully the structure I used helped you understand how to think about the problem in a more linear (computer-y) way.

I love teaching, so that was its own reward. Maybe in the future somebody will need help developing prints, and you can step in on that :)

The 60 LEDs you mentioned are those 5050 SMD LEDs on foil tape. I use those all the time. Worst case, the one at the end will be voltage starved and look sick. As long as they're rated at the same or higher voltage your microcontroller is outputting, you're probably fine.

Send us a photo of your setup, though!

cruft
Oct 25, 2007

Ethics_Gradient posted:

Out of curiousity, how long did it take you to write?

I dunno, maybe 5 minutes? Most of the time was just trying to understand what you wanted.

That's a nice looking display, I figured it would be dinky but that's massive! What software are you using to model the enclosure?

cruft
Oct 25, 2007

Ethics_Gradient posted:

Haha, took me hours to figure everything out.

I'm going to guess you haven't written code five days a week for 30 years :wink:

quote:

One little niggling thing that I think I know how to solve - my little speaker makes periodic clicks when the device is plugged in, I'm guessing from background noise produced by whatever processes the Arduino has going on in the background. What value resistor would be good to place between it and the digital pin to filter this out?

There shouldn't be any clicks on your speaker pin. Adding a resistor will for sure make it so you can't hear the clicks as well, but it'll also mean you can't hear the speaker as well, since it will attenuate the signal going to it, like adding a permanently-adjusted volume knob.

I couldn't say what's causing the clicking but I might be able to help if you can get a recording of it. But for starters, maybe just try a different pin for the speaker. Perhaps the display driver code is also sending something out on that particular pin.

cruft
Oct 25, 2007

,

Sagebrush posted:

e: okay, I looked at the strip's datasheet. 5 volts, 4 watts = 800 mA, or 15 mA per LED. Pretty dang close to what I guessed, lol. And yeah that is far far beyond what the Nano's digital pins are rated to provide. Get yourself a relay module and you won't have to worry about burning out the board, and the LEDs will probably be like an order of magnitude brighter too.

I have to ask what the price is of the relay and new power supply vs. the price of replacing a burned out nano.

If you're worried about voltage starvation, OP, I think it'd be cheaper to just cut your LED strip in half.

e: Another option would be to buy (or salvage from some broken thing) a 5V power supply with, say, 5 or more amps, and wire the Arduino and LED strip in parallel.

cruft
Oct 25, 2007

cruft posted:

e: Another option would be to buy (or salvage from some broken thing) a 5V power supply with, say, 5 or more amps, and wire the Arduino and LED strip in parallel.

This actually won't work for the type of LED strip you have. So your options are:

  • Go back to just one LED
  • Trim your strip down from 60 to, like, 15 or fewer
  • Buy a relay or MOSFET and higher-amp power supply and rewire so the relay closes the circuit with the LEDs and the beefy PSU
  • Wait and see if your current setup actually kills your Arduino

Me, I would go with the "trim strip" option. My brother in law, who does this kind of thing for a living, would go with the "wait and see" option. Several posters ITT are suggesting the MOSFET/Relay option.

Which one are you going to do, OP? :ohdear:

cruft
Oct 25, 2007

Sagebrush posted:

Hook the strip up directly to a 5v/1A power supply if you want to see what it's really capable of.

For the benefit of the thread, OP, please (temporarily) do this, so you can report in on what the difference is. You can probably just connect the red wire to the 5V pin on your Arduino to get a close approximation.

I'm eagerly looking forward to the "GREAT GOOGLY MOOGLY THAT WAS BRIGHT" post.

cruft
Oct 25, 2007

Ethics_Gradient posted:

It didn't seem to do anything on the 5V pin but there already was one coming off that for the 7 digit display. I thought I had a bare USB cable for experimenting but can't find it, I will try it when I get the chance. Looking at the LED's again I can say they're pretty dim compared to the other ones I have.

I hope you realize that at this point the thread is just goofing around with you (with you, not at your expense). You already have a working gadget (congratulations!) and now we all just want to noodle around with your components for no other reason than there's nobody else posting at the moment.

So, like, please feel encouraged to just be, like, "nah".

cruft
Oct 25, 2007

Splode posted:

oh yeah if its battery powered I just don't have LEDs at all if I can help it. If I have to have it, I usually try and fix the energy problem with software rather than hardware though. Making the LED briefly flash rather than stay on saves so much power.

And making it flash *really fast* has the effect of dimming it! You can just call analogWrite(LED, 1) and it will output a pulse-width modulation signal with a 0.4% duty cycle, allowing you to skip adding the resistor :)

cruft
Oct 25, 2007


This right here is why I didn't get into electronics until I could do it in C.

cruft
Oct 25, 2007

namlosh posted:

That is shockingly poor writing… when I started picking up electronics and arduino/microcontrollers, I mainly stuck with:
the arduino forums
sparkfun
but mostly YouTube.

I actually prefer written articles to videos on topics I’m trying to learn most of the time… but the world is changing and I’m trying to adapt :)

Adafruit Learn is another superb resource.

cruft
Oct 25, 2007

DreadLlama posted:


The device signature was 0x1e950f and according to the 1st google result for that, the board isn't an ATmega328P, but an ATmega328PB. This requires something called "minicore" . So I did this: https://github.com/MCUdude/MiniCore#boards-manager-installation, and I think the bootloader burned successfully.

This is a wild ride so far, and I'm here for it.

Adbot
ADBOT LOVES YOU

cruft
Oct 25, 2007

Hell yes, you got D-Pad candy!

I heard if you suck the Konami code, you can spit in seven different colors!

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