|
Oh, that makes it more interesting. Does it show up in your device manager as an erroneous / uninstalled device? Or there is just no change when you plug it in? If the latter, try a different USB cable and all the different ports.
|
# ? Sep 11, 2022 23:18 |
|
|
# ? May 30, 2024 09:19 |
|
ante posted:Oh, that makes it more interesting. Does it show up in your device manager as an erroneous / uninstalled device? Or there is just no change when you plug it in? The Teensy2.0++ shows up as an HID Keyboard/Joystick/Mouse combo, and on second look the 1st gen Uno shows up as an UnoJoy Joystick (I must have been fiddling with it awhile ago). The other Teensy and the Trinket Pro don't show up as anything at all because I believe they have neopixel sketches loaded on them. I've tried half a dozen cables on each, on every USB port across 3 computers, and nothing will open serial ports. On each of the 4 boards, lights will come on and USB will power them, but otherwise no communication.
|
# ? Sep 11, 2022 23:53 |
|
Do they have in circuit programming pins? If you can get one of them working, or find a working one, you can likely use the programming pins to flash them back to a default state and hopefully they show up then.
|
# ? Sep 12, 2022 00:00 |
|
Cojawfee posted:Do they have in circuit programming pins? If you can get one of them working, or find a working one, you can likely use the programming pins to flash them back to a default state and hopefully they show up then. All 4 of them have FTDI or ICSP headers if that's what you're asking, I was gonna grab a FTDI interface, but I fear that's just gonna show up disabled too.
|
# ? Sep 12, 2022 00:24 |
|
spookykid posted:All 4 of them have FTDI or ICSP headers if that's what you're asking, I was gonna grab a FTDI interface, but I fear that's just gonna show up disabled too. You can still program them with ICSP. It's something in the USB library/driver/whatever on the other controller on the board. ATMEGA32u4?
|
# ? Sep 12, 2022 05:05 |
|
I have a "clean" windows 11 PC arriving in the morning, so I think I'll try it on that when it comes in. If I'm still having problems or if it "fixes" it I'll send a trip report to the thread. EDIT: gently caress YES I GOT ONE OF THE TEENSYS WORKING! spookykid fucked around with this message at 09:03 on Sep 12, 2022 |
# ? Sep 12, 2022 07:10 |
|
Foxfire_ posted:
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.
|
# ? Sep 13, 2022 17:26 |
|
cruft posted: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. same.
|
# ? Sep 14, 2022 01:06 |
|
spookykid posted:So I searched the thread and didn't come up with any results, so here goes: I have four microcontroller boards (a Trinket Pro, two Teensy 2.0++'s, and a first gen Arduino Uno) they have all worked for loading sketches to them in the past, but when connected to any of the three working comps I have (all running win10 pro), they refuse to open a COM port. I know they're all working, because the previous sketches loaded to them are still on them and working fine. The last time I played with any of them was 3-4 years ago, but I got a hankerin' to get some neopixel LED strips working again. Ok, so an update: I got the V1 Uno up and programmable via a USBasp V3 adapter board (I suspect the onboard USB-B port on it is roached, or the USB to serial), got both Teensy++ 2.0's up and running via TeensyDuino (still working fine after a decade), the 4 Trinket Pro's via FTDI, and the 3 Nano clones via... well they just worked out of the box. I have some ESP32-cam's coming in the mail for a little peephole cam project, which should be fun. spookykid fucked around with this message at 03:51 on Sep 18, 2022 |
# ? Sep 18, 2022 03:47 |
|
Paid way too much for a RISC-V based, USB-C powered, uh, arduino-esque device: "CH32V003 RISC-V MCU offers 2KB SRAM, 16KB flash" RISC-V is kind of sort of like ARM but it's open source and royalty free. It's pretty rare that a commercially viable, completely new chipset comes on the market you can actually buy. Rust, C, C++ and, I think, micropython already have gold/platinum support for the If you follow the raspberry pi thread you might have been following along on my misadventures of getting Ubuntu installed on a 1ghz 64 bit 1gb ram RISC-V chip. This is sort of the other end of the spectrum. https://www.tindie.com/products/adz1122/ch32v003-risc-v-mcu-offers-2kb-sram-16kb-board/ Will report back if I manage to get a blink.c to compile and run, in uh, however long it takes to get here from China edit: more specific specs: CPU – 32-bit “RISC-V2A” core up to 48 MHz Memory – 2KB SRAM Storage – 16KB flash Peripherals: Up to 18x GPIO with interrupt support 1x USART interface 1x I2C 1x SPI 10-bit ADC up to 8 channels 1-Wire debug interface General purpose DMA controller Timers: 16-bit advanced timer 16-bit general-purpose timer 2x watchdog timers 32-bit system timer Misc – 64-bit chip unique ID Supply voltage – 3.3/5V Low power modes – Sleep, standby Power on Reset (POR), programmable voltage detector https://www.cnx-software.com/2022/10/22/10-cents-ch32v003-risc-v-mcu-offers-2kb-sram-16kb-flash-in-sop8-to-qfn20-packages/ double edit: risc-2va quote:The Amber processor core is an ARM-compatible 32-bit RISC processor. The Amber core is fully compatible with the ARM® v2a instruction set architecture (ISA) and is therefore supported by the GNU toolset. This older version of the ARM instruction set is supported because it is not covered by patents so can be implemented without a license from ARM. https://www.eetimes.com/cambridge-calling-the-rise-of-the-arm-clones/ this article is from 2013 I think this means it's equivalent to an ARM3 cpu as it uses the same ISA https://en.wikichip.org/wiki/acorn/microarchitectures/arm3 Hadlock fucked around with this message at 05:38 on Oct 28, 2022 |
# ? Oct 28, 2022 05:27 |
|
Very neat. I did a bunch of stuff on MIPS back in the day, and this is an interesting development in that space.
|
# ? Oct 28, 2022 13:46 |
I’m about to start messing with HID stuff, buttons and analog axes using the joystick library seems pretty simple. Set an axis value, done. Send a button press or release, done. One control is like to do is a multi-state toggle. Let’s say a knob with three positions: off, mid, on. 1, 2, 3. Whatever. What would be the normal way to approach that? Three separate buttons that I just do a set state on at the same time? A button press that maintains until the knob changes and then a release followed by a different press? Is there some way to have a button that can be in one of more than just two states?
|
|
# ? Nov 5, 2022 18:43 |
|
Depends on how the software you're hooking it up to interprets button presses. No, there is no way with the basic game controller HID format to have a button with more than two states. A double-throw switch with a central neutral position, for instance, could be two buttons (button 1 pressed / button 2 pressed / neither) or three buttons (add another button for the neutral). I have built similar things for flight simulation, and generally you have to treat each position of the knob as a separate button. A 5 position knob is 5 buttons. You decide, based on how your software works, whether you want the button to be held down as long as the knob is in that position, or if it sends a single press when you click over to that position. If you have it programmed the first way, so that one button is always pressed whatever position the knob is in, consider whether that will cause problems binding it into your flight simulator or whatever. Some software interprets only a falling edge in the binding dialog, while others read the state of every button. Sagebrush fucked around with this message at 19:11 on Nov 5, 2022 |
# ? Nov 5, 2022 19:09 |
For now, the target is, of course, DCS. But E:D is also on the list, along with whatever other sims come up. Will have to do some experimentation I guess, thanks.
|
|
# ? Nov 5, 2022 19:14 |
|
Bad Munki posted:For now, the target is, of course, DCS. But E:D is also on the list, along with whatever other sims come up. Will have to do some experimentation I guess, thanks. So you can write an HID table for your device that does what you want it to do. Inside your device, you can have a knob be a shift-thing and send a different HID code out to the OS depending on the postion of that knob. If you're just implementing a generic joystick HID, then your "shift" is a button, as already described. If you're implementing e.g. a Gamepad, then you can do a Button Collection, which supports "chorded" commands. You'd have physical descriptors for your buttons and then set up button collections so that your "shift" knob will always "chord" with one of your selection buttons. You could also implement a "flight simulation device" that outputs the specific control you want. So your little knob changes whether a button is "flaps up" or "gear up" or whatever. Again, this is in hardware. You're writing (in your microcontroller code) the HID descriptor to output the right thing. If you know you want a knob that does different things, then the knob itself doesn't get a button assignment. Your microcontroller looks at the state of the knob and its associated switches and outputs the correct button. With one 3-position knob and 3 switches, you'd have B0, B1, B2 that could be output when the knob is in position 0, then B3, B4, B5 when it's in position 1, and B6, B7, B8 when it's in position 2. Your HID descriptor says you've got 9 buttons, even though you've only got 3 physical switches. The OS software doesn't (and can't) know that it's impossible to press B3 and B0 at the same time. edit: https://www.usb.org/document-library/hid-usage-tables-13 babyeatingpsychopath fucked around with this message at 22:01 on Nov 6, 2022 |
# ? Nov 6, 2022 21:57 |
Man I forgot how much I don’t like C & co. Is there a HID-capable device that I can do in Python or something? 😅
|
|
# ? Nov 8, 2022 04:22 |
|
Bad Munki posted:Man I forgot how much I don’t like C & co. Is there a HID-capable device that I can do in Python or something? 😅 Yes. https://docs.circuitpython.org/projects/hid/en/latest/
|
# ? Nov 8, 2022 05:23 |
That's cool, will have to look into it, actually. It's been a hot minute since I've messed with anything Arduino or similar, so the ecosystem has definitely changed and I'm pretty rusty here to boot. Like, the better part of a decade maybe since I've tinkered with this stuff? e: I guess I had a potential project I poked at a year ago but I was out of time and it didn't coalesce. :/ Either way, it's been a long time since I was really into this. Anyhow, barreling onward: using something like the Joystick library, shouldn't this thing be showing up in Windows as a game controller, or am I misunderstanding something fundamental? Google is leading to lots of older posts with the same issue but no concrete answers. Bad Munki fucked around with this message at 05:58 on Nov 8, 2022 |
|
# ? Nov 8, 2022 05:56 |
|
Bad Munki posted:That's cool, will have to look into it, actually. It's been a hot minute since I've messed with anything Arduino or similar, so the ecosystem has definitely changed and I'm pretty rusty here to boot. Like, the better part of a decade maybe since I've tinkered with this stuff? e: I guess I had a potential project I poked at a year ago but I was out of time and it didn't coalesce. :/ Either way, it's been a long time since I was really into this. Yes, after you get it written correctly and uploaded, theoretically it'll reboot as an HID device and show up as "hid joystick." You didn't mention what "this thing" is yet, though. Also, since I did all of my HID work, HID usage tables got updated (1.3 now, vice 1.2 in my stuff) and the HID spec is now 1.11. There's a bunch of neat stuff. You can actually define buttons as selectors now, so in your HID descriptor (OS software side, probably) you can set one button that will change the meaning of another button. Still working through how to get all that to work, as "DT.EXE" from 2001 is specifically deprecated. That said, I may update the usage files and see if I can't output something useful that's got the right feature set.
|
# ? Nov 8, 2022 06:32 |
babyeatingpsychopath posted:Yes, after you get it written correctly and uploaded, theoretically it'll reboot as an HID device and show up as "hid joystick." You didn't mention what "this thing" is yet, though. Ah, whoops, I'm chasing this on a couple venues, guess I hadn't laid out the details. Doing flight sim nonsense, want to make some extra controls. Mostly toggles and buttons, easy stuff. For now, though, I'm starting with a device that will literally do nothing but provide a big rear end round red button that I'll map to EJECT. I figure that's the easiest possible actual control I can make. The controller, and the button. Seems like if I can get that one button working, I can just stack on more and more to my heart's content. It's a beautiful button: It's illuminated, and I'm pretty sure I can pop the dome off and put whatever label I want inside, like "NOPE" or "GTFO" or "BRB AFK" Anyhow, I grabbed that, and a pro micro (I guess that's a sparkfun creation) clones, they seem to be pretty popular for this and my understanding is that that's the chip I need (32u4). These boards bill themselves as a Leonardo. This is the exact board I grabbed: https://www.amazon.com/dp/B08BJNV1J3?ref=ppx_yo2ov_dt_b_product_details&th=1, and as far as I can tell, it seems healthy out of the box. I grab the JoystickButton example from the Joystick Library and load it up verbatim: code:
Bad Munki fucked around with this message at 06:46 on Nov 8, 2022 |
|
# ? Nov 8, 2022 06:42 |
|
Bad Munki posted:Ah, whoops, I'm chasing this on a couple venues, guess I hadn't laid out the details. Looks like it should work, then. Do you see a device in the device manager? After I get some stuff settled on my end, I'll see if I can dig a ProMicro out and see what's going on.
|
# ? Nov 8, 2022 13:55 |
Just to provide a little more info on this (but zero headway): I think I mentioned the board shows up in the Device Manager, but only under Ports: As far as I can see, it doesn't show up anywhere else, at least not anywhere with Leonardo in the name. Doing the same thing via the command line: Now, I did load just a plain keyboard sketch on it using the Keyboard library or whatever it is that's included with the Arduino enviro, and that actually did produce a new device (keyboard) in the Device Manager, but it didn't have any recognizable identifiers on it I could see, I just noted that that group went from 7 items to 8. That was last night, so maybe I should do that again today with a clearer head and see if I can spot anything about it now. I guess for development purposes, I could also disconnect all my extra crap I normally have on here, that's certainly not making these lists any easier to comb through. e: For kicks, I also examined it connected to my Mac: Bad Munki fucked around with this message at 23:18 on Nov 8, 2022 |
|
# ? Nov 8, 2022 23:13 |
|
Bad Munki posted:Just to provide a little more info on this (but zero headway): I pulled out an old Arduino Pro Micro and loaded one of my programs that uses the NicoHID library to make a game controller. I noticed the same thing you're seeing, mainly that the device manager only shows a single device called "Arduino Leonardo" under the COM port devices. I can't find a game controller anywhere. However, it does work and if I go to Control Panel > Hardware and Sound > Devices and Printers, the leonardo is listed as a gamepad device. I know I'm using a different library, but I'd imagine that it works very similarly. Do you see anything in the control panel? Also, if you do see a device under the devices and printers, you can right click on it, hit "Game Controller Settings" and then "properties" and it'll bring up a very useful debug menu for looking at button presses and (one) joystick.
|
# ? Nov 8, 2022 23:47 |
Well, that's something. I do see it under Settings->Bluetooth & devices->Devices->Other devices, and it does have a little gamepad icon next to it, which is also where my left joystick, rudder pedals, and Index controllers show up. Right joystick, which is the same hardware and firmware, shows up under the Input group. However, in any case, I can't do anything with any of the items as displayed here aside from "remove device." Looks like maybe you're on Windows 10? I'm on 11, looks a touch different, wonder if I need to go about this another way. The fact it's showing up in that list, though, alongside other game controllers, and has a game controller icon is promising, at least.
|
|
# ? Nov 8, 2022 23:59 |
|
Oh you're right. My laptop is old and I'm still on Windows 10.
|
# ? Nov 9, 2022 00:27 |
I've got a PC with windows 10 on it, upgraded from it this spring, I'll fire it up and see what goes. Really appreciate the help here. There's little more disappointing then getting a big fun idea that should be stupid easy to get launched and then getting stymied on Step 0.
|
|
# ? Nov 9, 2022 00:32 |
|
Bad Munki posted:There's little more disappointing then getting a big fun idea that should be stupid easy to get launched and then getting stymied on Step 0. That's like one of my top beefs with programming/technology. Well, if you have some free time, you could always try to rewrite the script using NicoHID. It's almost line for line the same as the current one you're using, so it most likely won't do anything, but if you're out of leads, that's something to try. Just wondering if there's more info you can provide about what's not working. You said you want to use it for DCS, right? Is it not showing up as a controller in Steam or the game config options? Just trying to see if there's other opportunities to see if anything responds to the buttons on the arduino.
|
# ? Nov 9, 2022 03:24 |
Yeah, I was going to give nico a try after seeing you mention it. As far as “not working” I mean as far as I can tell, it’s not showing up as a game controller of any sort anywhere. Not in device manager, not in the built in windows joystick tester, not in steam, not in DCS. Nothing I’ve found has said “ah yep, there’s a controller” Gonna try nico, will report back.
|
|
# ? Nov 9, 2022 03:35 |
|
I ran into similar issues when trying to make my own controller with a teensy. For me, it did actually show up as a game controller, but it refused to update to see the new buttons or axes I added. The problem was that windows caches what a device is or something and then refuses to see it as something different. I had to get some program to edit the list of USB devices my computer had seen and delete the device and then plug it back in to see the actual configuration I had programmed into it. Is it possible you had the keyboard sketch installed before and now windows only wants to see it as a keyboard?
|
# ? Nov 9, 2022 03:36 |
Nah, it doesn’t show up as a keyboard unless I throw the keyboard sketch on it. But what I might do is do that again and get some details on the device in that state to help guide my expectations. Maybe as a mouse, too. You know, get a handle on what does work, and go from there, instead of coming in completely blind. Not sure how much headache I’m getting by doing this with windows 11, too, as all the guiding documentation for these issues refers to windows 10.
|
|
# ? Nov 9, 2022 03:38 |
Son of a biscuit It works 😢 The problem is Windows 11 But, I guess at least that’s progress. Not sure how the hell I’m going to overcome this one though. Bad Munki fucked around with this message at 06:32 on Nov 9, 2022 |
|
# ? Nov 9, 2022 06:30 |
|
I've been playing with ESP32's quite a bit recently, primarily with the idea of doing addressable LED strips, strings, and panels/matrices. They're cheap (~$6.50 on Amazon, ~$3.00 on aliex) and quite powerful little boards. This world has gotten quite a bit cooler than when I first touched them almost 10 years ago. Back then an arduino could control ~300 "neopixels" at like 5fps and now with a single ESP32 you can get high FPS with over 2000 pixels. What realllly made it wild was wled, an opensource crowd-based project that's pretty powerful it's currently in 13.3 stable and 14.0 beta and was originally designed for ESP8266's (they still work). You can install it here directly from your browser or you can get ahold of the .bins for other hardware versions (ESP32-S2, -C3, certain smart bulbs, etc) pretty easily and upload them via python+ESPtool. It supports almost every addressable strip out there, and even old PWM "dumb" strips with a little work. The GUI is amazing and controllable through wifi, and even has alexa support. The community is one of the best and beats the hell out of stuff like the arduino forums, reminds me a bit of this thread actually. E: Here's a Cyberpunk 2077-inspired jacket I made for Halloween: https://cdn.discordapp.com/attachments/722629519105851448/1035681969717129256/PXL_20221028_222612575.TS3.mp4 Here's a 1024 pixel matrix that fit nearly perfectly in an "album cover display" 12.5x12.5" frame: https://cdn.discordapp.com/attachments/722629519105851448/1035403273999482880/PXL_20221028_040155510.LS.mp4 And here's a very basic 300 pixel strip running some audio reactive stuff from my laptops mic at a show on Halloween: https://cdn.discordapp.com/attachments/722629519105851448/1039883072021213224/PXL_20221030_073753825.TS.mp4 spookykid fucked around with this message at 13:47 on Nov 9, 2022 |
# ? Nov 9, 2022 13:33 |
|
Bad Munki posted:Son of a biscuit If you're getting any difference from one OS to another something is really funky. This should be appearing as a standard USB HID device, operating system should be entirely irrelevant. Any version of Windows since 95 OSR2 should see it more or less the same way. Likewise for any Mac since whatever shipped on the iMac, any Linux since kernel 2.4, etc.
|
# ? Nov 9, 2022 16:01 |
I don't know much at all about USB stuff, but is it possible it's identifying itself in some way that's more or less appropriate and Windows 10 would tolerate it, but isn't quite right such that Windows 11 would refuse to play ball? Like, oh, maybe the $10,000 Genuine USB Device™ Certified™ By Microsoft Windows Security™ bit wasn't set or something. Google suggests I'm not the first person to have a device that worked on 10 magically not work with 11.
|
|
# ? Nov 9, 2022 16:05 |
|
Bad Munki posted:I don't know much at all about USB stuff, but is it possible it's identifying itself in some way that's more or less appropriate and Windows 10 would tolerate it, but isn't quite right such that Windows 11 would refuse to play ball? Like, oh, maybe the $10,000 Genuine USB Device™ Certified™ By Microsoft Windows Security™ bit wasn't set or something. I suspect it's something along the lines of what Cojawfee said, your Windows 11 PC has cached a configuration for that device that you need to either delete or change the device ID to bypass. It's been a couple of years since I last built a gamepad but I do recall having to shuffle my USB device IDs a few times while testing and the reason rings a bell. I'm having trouble finding where you might change the device ID though with this library. The input devices I've built, I've used a Teensy++ and based my code on the Teensyduino USB_Joystick example. The way the Leonardo handles HID seems like it might be less customizable. quote:Google suggests I'm not the first person to have a device that worked on 10 magically not work with 11. Windows 11 cracked down on a lot of bad behaviors so I'm sure there were a few devices that had been dragging along XP or Vista era drivers or software that has never done things right but was tolerated back then which stopped working, but that's a matter of third party drivers or software doing things they're not supposed to. Devices that use standard class drivers are supported directly by the OS itself, any breakage affecting generic HID would have a massive impact.
|
# ? Nov 9, 2022 17:04 |
|
wolrah posted:
It's this. When you "remove device" from Device Manager, it doesn't actually remove everything completely. Instead, download USBDeview and use it to clear the cached record of the device. Then the next time you plug it in, Windows should pick up its new configuration. https://www.nirsoft.net/utils/usb_devices_view.html You can also change the device id so that windows starts from scratch, but this way is cleaner. Also if you're trying to write your own HID class, as I decided to do during the covid lockdowns for some reason, changing the ID every time you make a modification is dumb and tedious. Nirsoft's USBLogView is also very useful for this sort of work. Sagebrush fucked around with this message at 17:26 on Nov 9, 2022 |
# ? Nov 9, 2022 17:15 |
Will give that a try as well, I did go into the device manager and opened the Leo up under the ports group and in that window, there's an option to "rescan hardware" or some such, I would have expected that to beat the cache, but I'll try anything at this point. There was also mention elsewhere that Device Guard might be interfering in some way and a guide to work around that? More options. Since I have it working on Windows 10, I'm at least going to go wire up the single giant button and drop a stupidly simple sketch on there to make use of it, test that on Windows 10, and then use that to to troubleshoot the issue on my primary Windows 11 PC.
|
|
# ? Nov 9, 2022 17:32 |
|
Yeah no Device Manager is more of a fake-out than a real solution most of the time. Nirsoft has a tool for that, too! https://www.nirsoft.net/utils/device_manager_view.html Nir Sofer makes so many useful little utilities. I have dozens of them. It seems like eighty percent of the time when I'm struggling with some bizarre obscure Windows problem, I end up getting redirected to a Nirsoft tool that does exactly what I need. The whole site is like a time capsule from 1998 when web pages were simple and stuff you found on the internet was genuinely useful. https://www.nirsoft.net/utils/index.html e: Sagebrush fucked around with this message at 17:41 on Nov 9, 2022 |
# ? Nov 9, 2022 17:36 |
|
Bad Munki posted:The problem is Windows 11 I had a TON of problems with Windows 11 and including Arduino libraries. To a point where I had a sketch on my main PC that worked, put it on a thumb drive, loaded it on my laptop with the same library included and it refused to actually use it. The verbose compiler would show it including the library, but it didn't work at all. I think it was something to do with the forced onedrive bullshit. I ended up having to completely remake the sketch, making sure to only use libraries I loaded with the IDE's library manager. Giant rear end-pain when all I wanted to do was be able to work on the sketch sometimes with my laptop and sometimes with my PC. The fancy new Arduino IDE also had some weirdness and I ended up downgrading on the Win11 laptop.
|
# ? Nov 11, 2022 21:47 |
|
|
# ? May 30, 2024 09:19 |
|
Enos Shenk posted:I had a TON of problems with Windows 11 and including Arduino libraries. To a point where I had a sketch on my main PC that worked, put it on a thumb drive, loaded it on my laptop with the same library included and it refused to actually use it. The verbose compiler would show it including the library, but it didn't work at all.
|
# ? Nov 11, 2022 22:18 |