|
babyeatingpsychopath posted:Let's see the soldering job. Since it's I2C, there's a chance your soldering may have bridged/broken the I2C address pins so your code isn't trying to talk to the right device. The brief flicker at power-on may or may not be good. The I2C LED stuff I have doesn't do ANYTHING until it sees valid I2C instructions on the bus, so the flickering may indicate that something's cross-wired. 'Twas the soldering after all! Had to wait until my partner was back at work to check; I wear a respirator when I work, but she's still not a fan of me soldering in the house. I've also soldered some jumper wires to the female 1/4" jack which connects to my foot pedal; tested it by putting it between the Arduino 5V pin and the power rail on the breadboard and it's working Feeling proud of myself on the latter; didn't come with any documentation so had to figure out the pins using my multimeter. Now to have a play around and see how to actually output to the display. edit: this is a lot harder than expected Has anyone got a recommendation for a YouTube series on learning Arduino? What I'm after being able to do is:
None of this seems like it should be too hard, but my hamfisted attempts to jam code together from different sketches isn't working out too well! Ethics_Gradient fucked around with this message at 06:48 on Apr 20, 2022 |
# ? Apr 20, 2022 00:05 |
|
|
# ? May 30, 2024 09:31 |
|
Update: I found Paul McWhorter's series which is really great; very thorough and well-explained, with some "pause and try to do this yourself now" tasks that build on what he's been teaching. Episode 2 contains a 30 minute deep dive into the physics of LED's and semiconductors which I admittedly skipped most of, but nice to see the detail is there if I want it. Been using the TinkerCAD emulator for now. Question: from adafruit's tutorial for my 7 segment display + backpack, it says the backpack has two additional commands: quote:There are also a few small routines that are special to the backpack: Probably missing something obvious here, but how do I add them? I'd assumed they were in one of those libraries mentioned in the code (don't want to quote it all again, it's in my earlier post though), but when I try to put them into the sketch and compile it says they're undeclared.
|
# ? Apr 21, 2022 22:09 |
|
Ethics_Gradient posted:...but when I try to put them into the sketch and compile it says they're undeclared. Can you post your code?
|
# ? Apr 21, 2022 23:01 |
|
Ethics_Gradient posted:Update: I assume you're calling matrix.setBrightness() and matrix.blinkRate(), since your device is defined as Adafruit_7segment matrix = Adafruit_7segment();
|
# ? Apr 22, 2022 05:43 |
|
DC to Daylight posted:Can you post your code? I didn't want to spam the thread, it's on the last page. babyeatingpsychopath posted:I assume you're calling matrix.setBrightness() and matrix.blinkRate(), since your device is defined as Nope! Didn't realise I needed the "matrix." in front. Working now
|
# ? Apr 22, 2022 10:41 |
|
Ethics_Gradient posted:I didn't want to spam the thread, it's on the last page. D'oh - Should have noticed that. To add a little to BEP's comment, let's look what your setup code did. Adafruit_7segment matrix = Adafruit_7segment(); The Adafruit_7segment is the object type. Matrix is the name for the object you created. And the function is a handler to set up the object. So "matrix" isn't some magic word, it's just the name that Adafruit chose for the 7-segment object in their code. Compare this with, for example, int MyInt = random(); Same concept - what kind for variable (integer in this case), an arbitrary name, then a function that assign a value to it. I'll also add that although I've never used that display, the dimming function on every one I've tried is barely functional. Like 15-20% change in brightness from min to max.
|
# ? Apr 22, 2022 14:33 |
|
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.
|
# ? May 5, 2022 23:57 |
|
I found out I work with a guy who is really proud of using notepad++ in TYOOL 2022 and I'm pretty sure he's under 40
|
# ? May 6, 2022 06:34 |
|
Hadlock posted:I found out I work with a guy who is really proud of using notepad++ in TYOOL 2022 and I'm pretty sure he's under 40 A decent number of junior python CS majors ive interviewed are proud of using vim or text editors to write their code rather than a proper ide with some default linting I review their code its very poorly formatted
|
# ? May 7, 2022 02:40 |
|
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.
|
# ? May 7, 2022 02:53 |
|
(Bad) job interviewers love to use that as a gotcha though
|
# ? May 7, 2022 03:12 |
|
Hadlock posted:I found out I work with a guy who is really proud of using notepad++ in TYOOL 2022 and I'm pretty sure he's under 40 It sure beats normal notepad for editing text files? I use it a lot. But not for coding, obviously.
|
# ? May 7, 2022 08:09 |
|
Wibla posted:It sure beats normal notepad for editing text files? I use it a lot. But not for coding, obviously. Oh yea NPP is great IMO. I use it several times per day
|
# ? May 7, 2022 08:20 |
|
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.
|
# ? May 7, 2022 13:37 |
|
CarForumPoster posted:A decent number of junior python CS majors ive interviewed are proud of using vim or text editors to write their code rather than a proper ide with some default linting We had a "senior" guy on our team he was very proud of writing all his code (mostly go, bash, yaml, json) in vim I would load up his code in my ide and the whole thing would be full of red and yellow squiggles under the text, just pages and pages of it One day in a very passively agressive moment of rage I ran all his code (like 9 repos) through gofmt and various linters and finally fixed his poo poo with a bunch of PRs
|
# ? May 7, 2022 19:16 |
|
cruft posted: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. Unless you're doing this cause you had to SSH into something, I bet your code has mad squiggles bro
|
# ? May 7, 2022 23:39 |
|
CarForumPoster posted:Unless you're doing this cause you had to SSH into something, I bet your code has mad squiggles bro Mmkay.
|
# ? May 8, 2022 00:31 |
|
vim can autoformat and autocomplete. it’s not 1996 any more.
|
# ? May 8, 2022 03:12 |
|
gui vim even has squiggles
|
# ? May 8, 2022 03:21 |
|
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?
|
# ? May 23, 2022 18:17 |
|
cruft posted: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. 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.
|
# ? May 24, 2022 02:14 |
|
babyeatingpsychopath posted:Their example sketch specifies additional arguments to the constructor, so probably? Well, at least somebody else is saying "who knows, gently caress around with the arguments until it works".
|
# ? May 24, 2022 13:30 |
|
cruft posted:Well, at least somebody else is saying "who knows, gently caress around with the arguments until it works". Mostly because I can't see your code and don't know specifically what specific things you're using for "sensors."
|
# ? May 25, 2022 01:12 |
|
I'm at my wits end on this. I've been programming Arduino stuff for years, and this is baffling. To put it briefly, the project is to have an (3.3v) Arduino interpret a sensor input for a Brightsign (digital video player, uses 3.3V GPIO). Final program will use a Teensy, but right now I'm messing with an Adafruit Metro M0 because it is on my desk. Basically, if the Arduino reads the sensor trigger, it does a lighting effect on some neopixels, and puts an output LOW. This triggers a video to be played on the Brightsign. It then waits for the Brightsign to run a pin HIGH when done. When it sees the high signal back, it stops the lighting effect, and goes back to reading the sensor, waiting for the trigger. I've had no trouble with the output signal at all. It's the input back that's driving me nuts. I did some checking, and realized the Brightsign is most likely pushing it's Output HIGH when active, but when inactive, is floating, not being pulled low. (Hardware docs: https://brightsign.atlassian.net/wiki/spaces/DOC/pages/378832362/HDx24+Hardware+Interfaces#HDx24HardwareInterfaces-GPIO) So, I thought, oh, simple, I just need to use a pulldown resistor. No dice. I've gotten to the point where I've completely started over from scratch, and I've written a program that sends me serial messages at each step. I was still having trouble. Even with NOTHING connected to the pin, or changing it to a pullup and reversing the logic, I'm getting some stupid-rear end results. I've stripped it down to just this: code:
goddamned stupid console posted:1 The 1 should mean it just can't loving even post the serial comment!! I've tried changing pins, doing pullups, pulldowns, etc. I've pulled a fresh Metro Express right out of the box and I'm getting the same problem. I don't even have anything connected to the pins when doing a pullup, and this happens. Am I missing some dumb obvious thing? edit: typo in code that was also present in program. didn't fix it though. Fanged Lawn Wormy fucked around with this message at 22:41 on May 26, 2022 |
# ? May 26, 2022 22:24 |
|
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.
|
# ? May 26, 2022 22:40 |
|
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.
|
# ? May 26, 2022 22:44 |
|
Fanged Lawn Wormy posted:yep, grounds are tied together. 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 |
# ? May 26, 2022 22:57 |
|
Ok, I AM a moron. It was the typo I edited out, but my brain was so fuzzy I didn't click with me that it did change. this was the typo: if (reading == LOW); <<<<<<<<<THAT SEMICOLON of course, I didn't realize right away, I just observed that the TX led was blinking and glanced at the serial window and saw output and cussed. But of course it was supposed to be sending messages. It sends the pin status no matter what. it adds the extra text line if it sees the correct result. I need sleep.
|
# ? May 26, 2022 23:06 |
|
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.
|
# ? May 26, 2022 23:09 |
|
at least it wasn't using = instead of ==. there was a few months where I just couldn't stop making that mistake. Visual studio often flags that now though, so that helps. Or, another one I've been doing: if(digitalRead(PIN == LOW)) - that also fucks some poo poo up
|
# ? May 26, 2022 23:29 |
Dear thread, I hope you can forgive me for barging in like this, it's a typical scenario I'm sure. I don't really know what I'm doing and don't know where to turn. I'm hoping somebody here can advise. http://brendanclarke.com/2014/04/23/arduino-based-midi-sequencer Kit soldered together, files downloaded, Arduino installer installed on my Thinkpad. The MIDI folder he included in his zip file, I can't get it to do anything, can't make the installer recognize it. So I went to the github page he also linked, DL it, get the installer to add it. Then I open the .ino file, try to compile, get a compile error many times saying it's calling to a library called MIDI that doesn't exist, it suggests I try MISO? Man this is frustrating. I imagine I've spent the better part of a day on this all together. I'm really frustrated. Have I angered the Gods?
|
|
# ? May 27, 2022 22:02 |
|
petit choux posted:Dear thread, I hope you can forgive me for barging in like this, it's a typical scenario I'm sure. I don't really know what I'm doing and don't know where to turn. I'm hoping somebody here can advise. Did you try installing the library through the Arduino IDE? Select Tools/Manage Libraries... Or Ctrl-Shift-L I searched for "arduino-midi-library" and it was there. edit: My screenshot has the wrong library highlighted. Its one called MIDI Library. Same author as the GitHub DC to Daylight fucked around with this message at 23:47 on May 27, 2022 |
# ? May 27, 2022 23:45 |
DC to Daylight posted:Did you try installing the library through the Arduino IDE? I did try that. And I try to compile and get a few dozen errors. I don't know what I'm doing and I don't want to further waste anybody's time. I probably just need to do some of those prepackaged projects that actually walk you through it instead of just going with one blog post that clearly assumes you already know how to do it all. Sorry and thanks, maybe I'll bring a working project over here sometime.
|
|
# ? May 28, 2022 00:02 |
|
I don't think anyone is going to mind you posting nonworking stuff in here and asking for help
|
# ? May 28, 2022 00:09 |
taqueso posted:I don't think anyone is going to mind you posting nonworking stuff in here and asking for help Okay thanks. Right now I'm pulling out my hair and getting ready to hit myself in the head and stuff so I'll try again later.
|
|
# ? May 28, 2022 00:17 |
|
petit choux posted:I did try that. And I try to compile and get a few dozen errors. I don't know what I'm doing and I don't want to further waste anybody's time. I probably just need to do some of those prepackaged projects that actually walk you through it instead of just going with one blog post that clearly assumes you already know how to do it all. Sorry and thanks, maybe I'll bring a working project over here sometime. Paste the errors into the forum, we don't have much to go on if you added the libraries but it can't find them when it's compiling the sketch. Arduino code is similar to C, C++, Java, etc. where the #include at the top of the file tells it which libraries to pull in so it can use the functions in them.
|
# ? May 28, 2022 07:40 |
Rexxed posted:Paste the errors into the forum, we don't have much to go on if you added the libraries but it can't find them when it's compiling the sketch. Arduino code is similar to C, C++, Java, etc. where the #include at the top of the file tells it which libraries to pull in so it can use the functions in them. I'm so sorry, I was kinda in a bad mood yesterday. I'll try it again. I'm still hoping there's a simple procedural detail that people who have experience in this stuff do reflexively and as soon a I get the bugs ironed out maybe I can do stuff like this without tearing my clothing or hair out. Arduino isn't my thing ordinarily, although I am in fact building up a DIY kit that has an Arduino as its core. Pretty excited about it too, they just put out a second revision too: They're using an open source project and selling it as a DIY kit, and I was proud to have succeeded in soldering it together, it was the most demanding soldering job I had done to this point and still not that good at it. It works fabulously, in my mind it's one of the best new instruments out there. This company appears to be a bunch of hipsters who name all their products after coffee drinks from Starbucks or something, but this product is solid: https://zeppelindesignlabs.com/product/altura-mkii-theremin-midi-controller/
|
|
# ? May 28, 2022 13:32 |
yeah, I'm looking at some of the documentation from the Sparkfun page about this MIDI shield and there appear to be a lot of really cool things I can do with this, I dunno, it looks really cool!
|
|
# ? May 28, 2022 16:11 |
Rexxed, since you have been so kind as to ask me to do that, I will soon. I have a few projects going on at the same time and this one hasn't been the highest priority. When I get my ducks lined up I'll attempt to do it again and be ready to show my work here.
|
|
# ? Jun 2, 2022 15:50 |
|
|
# ? May 30, 2024 09:31 |
|
No problem, I have a lot of projects too!
|
# ? Jun 2, 2022 22:01 |