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
Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
How did you even get one? Nothing I can find even lists a price (aka expensive).

Adbot
ADBOT LOVES YOU

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Also, that guide lists a 7805 which drops to 5 volts, not 9 volts.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
The linear regulator gives you your desired voltage and converts the rest into heat which goes out into that metal tab on the top. You're meant to solder that tab to a heatsink of some sort.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
What even is that? Create virtual arduinos in the cloud or something?

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Is there a way you can tap into each digit individually? Seems like it's the 6th digit that's messing up. But if it's something that's cascading further down the line, looks like it would be a bitch and a half to figure out. Neopixels don't look fun to troubleshoot.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
If it happens at a similar distance on a different strip, it could be the signal is degrading.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Bricked my arduino Mega last night. I flashed it with Hoodloader2 a while ago. I loaded an HID thing to the 16u2 last night and then it just disappeared from my computer entirely. Luckily I had a spare Micro that I could use to flash it back to the hoodloader. Also lucky that the Micro has SPI pins on the side because I couldn't get the ISCP pins to work at all on it. But now I'm back to normal I guess. That's my story. I'm gonna use this Mega as a data logger for my breadboard computer and also maybe an emulator or the breadboard computer I'm designing.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Why do you have a 30A fuse going to your raspberry pi? Your pi will die long before that fuse even realizes there's any current going through it.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

ante posted:

I'm so confused by that diagram

Looks like it normally runs off the battery, but when another power source is attached, it activates the relay and then sends power through the normally open contact to provide power.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

Dairy Days posted:

That complicated circuit is just an excerpt from the arduino uno schematic, showing the built in switch other posters were talking about, and how if it is allowed to be powered through that switch it is also bypassing the 5v regulator because it expects the power coming from that switch to already be regulated to 5v. The two diode method will just let the higher voltage input be the power source like you said, so just use a higher voltage wall adapter and if that fails or is unplugged then the batteries will be allowed to power the device automatically. You should actually make sure to use schottky diodes if you plan on running off the batteries for more than intermittent faults so you get the most useful life out of them with this method, something like a 1N5817-1N5819 which is very common and cheap would work nicely if you don't plan on drawing more than an amp with this. Like others have said there are other ways to do this more efficiently but it seems like you shouldn't worry about that at this stage because those methods are more complicated. If you want to learn more the search phrase is "power supply ORing"

Why specifically a schottky diode?

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I'm in the process of making a controller with a teensy. The default joystick thing only supports six axes, and I need 7. So I've been trying to modify the USB files to add in the rX and rY axes. I spent the last couple days learning about the USB spec I guess and modifying what teensyduino comes with. I've figured out the USB packet, mapped out the descriptor bytes, filled all the bytes up, and everything I understand should work. But it just doesn't. It's just one of those situations where I change one thing and suddenly it gives me errors and warnings completely unrelated to what I just did. Or I have no idea if the change I made works because windows cached the old version and I don't know if it's broken, or just isn't refreshing. I know that the number of axes I want is possible because I can program it with MMJoySetup with the axes I want and the axes all show up in joy.cpl. But I want to put some more logic into this than it just being a generic USB controller. As far as I can tell, I can't do that with MMJoySetup. Looks like someone already made a modified usb thing but it's for teensy 3.x which is probably what I should have bought instead of the teensy++ 2.0. I guess a smarter person than me would just call it quits, pay the 30 bucks for the teensy 3 and move on, but I want to defeat this thing. It's just frustrating that I'm able to figure out on my own all the things that have tutorials, but the parts that I don't understand at all are apparently not explained anywhere on the internet.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I had not found that second thread, so thanks for that. I'll take a look a bit later.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I was able to modify the example from the second link One Legged Ninja posted and finally got it working, somewhat. I changed it to 34 buttons, 3 10bit axes, and 4 8bit axes. I think that should actually work fine. 10bit for the rotational axes and 8bit should work fine for translation and throttle. Maybe I'll continue messing with it to get more axes or get more resolution for the others but I think this should work well enough. Thanks for the help, everyone.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
It's 13 bucks, I'm sure it wouldn't hurt to buy one and crack it open to see what's in there.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Do any of the other pins do that?

Is pin 2 perhaps tied to the onboard LED? I ran into something like that when making my controller. Pin 6 I think was tied to the onboard LED on my teensy, so when I pushed the button connected to that pin, it would stay pressed. If that is the case, you can't use pullup like normal. You either need to figure out another way to do it, or remove the LED. I put a 1k resistor from the pin to ground and it solved my problem.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

Rapulum_Dei posted:

Is there a vistaprint or moonpig for PCBs where you can submit your design and they'll make and ship you one/ a few for projects like that?

JLCPCB or PCBWay

JLCPCB can be as low as 2 dollars for 5 pieces for 2 layers.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

ante posted:

No it can't

Why do people always neglect shipping on JLCPCB in particular. It's their marketing thing and it really seems to be working. And they've really hosed me on shipping.

Check out pcbshopper.com for price comparisons. The majority of them are in the realm of $14 for 5x5cm, qty 1.
I like PCBWay, or Seeed, but it's mostly all the same

Turns out shipping things across the world is expensive if you want them faster than on a boat.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
A human voice will carry farther than a phone speaker, so keep that in mind.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

poeticoddity posted:

If you're going to go through all that trouble, instead of a vibrator motor it should shock you like in that episode of the briefly lived Dilbert television series.

He's got the knack.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I don't think so. You just have to hope you get it right and then plug it into a new USB port.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

Citycop posted:

I admire your ambition. I'm just trying to get a little two line LCD working to display outputs and I'm struggling to get anything on screen.

Can you point me in a direction where I can learn how to write code in such a way that allows me to output to a display real time, while reading sensors real time? As a beginner I feel like there should be some method or way to write code that I am missing, that allows the CPU to loop continually while taking inputs and outputting data?

I hope this makes sense.

Is it the same two line LCD that everyone uses? If so, there's an arduino library for interfacing with it. You can follow this tutorial to get things going. As for what you want to do, you can just put everything in the void loop() section of your arduino code. In the first part of your loop, you collect sensor data. Then you display that data on the LCD screen. Flash it to your arduino and it continuously loops forever collecting sensor data and putting it on the screen. It's not real time, because the microcontroller can only do one thing at a time, but it goes fast enough that you won't be able to tell. And you might even need to slow it down because those LCDs can't update fast enough for how often the arduino can send data to it.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
That syntax doesn't look familiar to me, but that sounds like you have set them to be pull up. That means that they are set to 3.3v and when you push the button that shorts them to ground, they go to 0v which causes those GPIOs to be activated. There might be another setting like PUD_DN that sets them to actually be pulldown so your setup should work. If you have a multimeter or a logic analyzer probe, you can check those GPIO pins to see what they are set to. Also, if you are expecting the GPIO pins to be the ground, don't connect them to ground at all. And don't put your LED in series with the buttons. The GPIO pin will be expecting 3.3 volts, but there is a voltage drop across the resistor and the LED. After your switch to send the 3.3v, send one branch to the LED, and another branch to the two buttons.

Cojawfee fucked around with this message at 08:03 on Apr 6, 2020

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
For 5v, I think the threshold is usually around 2.7v.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Also, if anyone hasn't heard of twos complement and how it works, they should, because it's really cool.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Arduino is fun until you go too far and gently caress up the bootloader and you have to google how to reflash it with the SPI pins.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Do you want them to act like a bar graph or do you want to control them individually? You can also use a couple shift registers. It's a bit slower, because you have to shift out the all the bits every time one changes, but you can control as many LEDs as you want (within reason) with two wires.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I would assume you would want the header and the pins on the 328 to be the same, so you'd have the header and pins connected together and then to the resistor that I am guessing goes to VCC to hold the reset pin high.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
That's why I went straight to just using Microchip studio and programming my 328P directly. I don't really get all the stuff the arduino does and wouldn't know what to do with anything outside of the actual arduino board. But the directly manipulating the ports in C is making sense to me so far.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

thehustler posted:

I get what you’re saying and have gone down this route myself with ATTiny chips, but the approach of using the IDE with a breadboarded 328P chip has worked for me before, about six months ago. Forgot if there was anything specific I did.

Do I NEED to download the breadboard stuff for the IDE if I’m providing a chip with the same setup as an Uno?

I'm not really sure what you mean by breadboard stuff.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Did you test it first using a breadboard before making the PCB?

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I was wondering about the resistor because I don't have one for my mcu.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

thehustler posted:

Surprised this thread is so low traffic, but a quick question:

Everyone seems to use the SPI pins for shift registers. Do I have to? Can I use other digital pins? I have an SPI device I want to use as well.

I assume they use the SPI pins because it's fast and really easy to just call up the SPI function rather than bitbanging their own implementation. A shift register is just an input and a clock, so you can do it with any of the GPIO pins, you'll just have to manually do the clock signal.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Yeah, store the numbers and glow as a greyscale image. Then you can go through pixel by pixel and set it to be whatever color you want. I don't know how quickly a teensy can do that though.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

Harvey Baldman posted:

Can you maybe expand on this a bit? Tbh I don't understand much about the actual 0x pixel values - when I've been calculating my lithe colors I've been doing it with functions that take RGB565 and spit out a red, green, and blue integer that I can do math I understand with.

Each digit in the 0x0000 number is a hex number, which is 4 bits, and the whole thing is 16 bits. The first 5 bits are the red value, the middle 6 bits are the green value, and the last 5 bits are the blue values. You can extract these values by using bit masks and shifting to the right. So if you wanted the red value, you could take a random one from the list like 0x08c3, and then you would do a bitwise and with 0xF800, and then shift it 11 bits to the right and that gives you the 5 bit red value.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I think feather is Adafruit's own thing. It looks like they have boards with a bunch of different micro controllers. Arduino usually refers to a board with an Atmel micro controller. Usually some form of ATmega328 or 2560.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
You won't know until you try. It looks like there are modules made for arduino that have a microphone on them that return an analog value. Since you're not trying to listen to the audio or make it usable for anything, I'll bet you could just look at a rolling average of the magnitude of each microphone and build a loop that finds a couple seconds of increased audio to one side and have the head look over there. I would think the challenge would lie with moving the head. I don't know much about servos, so maybe it isn't, but I would assume you'd need some sort of servo driver board for something big enough to rotate a prop head.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
You can also get data only USB cables if this isn't going to be a permanent installation.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

Enos Shenk posted:

Have you guys had one of those projects where it just refuses to work, and due to your own fuckups and unknown errors you just keep digging deeper?

Stop doxxing me

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I don't understand why people are proud to make things harder for themselves. No one gives a poo poo if you've memorized the functions of an API and you can just type it without autocomplete. You still have an off by one error.

Adbot
ADBOT LOVES YOU

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
That's hilarious. Luckily, I think you can always recover it with the ICSP pins unless you set the fuses to lock the chip.

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