Main > Lightguns |
GUN4IR - The Ultimate 4 Points Lightgun System |
<< < (25/227) > >> |
PL1:
--- Quote from: Mysli0210 on January 13, 2020, 01:44:21 pm ---Well it's the same chip, so no magic difference there. the only 2 things that might differ, but not matter is the bootloader might be different, though entirely not needed if you flash via an external programmer, as with any avr chip. And the physical location of the pins may differ on a different board. But I reckon most people would get the pro micro clones as they're super cheap. --- End quote --- Cheap is good, but an ItsyBitsy 32u4 might be a better choice for JayBee's firmware than a Pro Micro due to the number of 32u4 ports not connected. ItsyBitsy doesn't have connections for two ports (pins) -- B0 (8 ) and D5 (22). Schematic here. Pro Micro doesn't have connections for seven ports (pins) -- B0 (8 ), D5 (22), B7 (12), C7 (32), D6 (26), F1 (40), and F0 (41). --- Quote from: JayBee on January 13, 2020, 12:13:46 pm ---the ItsyBitsy boards miss some functionalities needed for this system to work flawlessly --- End quote --- Does your firmware use any of the unconnected ports (pins) mentioned above, JayBee, or are the "functionalities" you mentioned something else? :dunno Scott |
Mysli0210:
--- Quote from: PL1 on January 13, 2020, 03:24:56 pm ---Cheap is good, but an ItsyBitsy 32u4 might be a better choice for JayBee's firmware than a Pro Micro due to the number of 32u4 ports not connected. ItsyBitsy doesn't have connections for two ports (pins) -- B0 (8 ) and D5 (22). Schematic here. Pro Micro doesn't have connections for seven ports (pins) -- B0 (8 ), D5 (22), B7 (12), C7 (32), D6 (26), F1 (40), and F0 (41). Does your firmware use any of the unconnected ports (pins) mentioned above, JayBee, or are the "functionalities" you mentioned something else? :dunno Scott --- End quote --- I just went through all the pins specified in the original post, they are all found on the pro micro. The ones you mention that the pro micro is missing are used for the following (taken from the atmega32u4 spec sheet) http://ww1.microchip.com/downloads/en/devicedoc/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf PB0 Used for the RX led on the board. PB7 Digital GPIO pin, found on arduino leonardo, skipped on pro micro due to the board being scaled down (no special functionality) PC7 Digital GPIO pin, found on arduino leonardo, skipped on pro micro due to the board being scaled down has some Timer and high-speed PWM functionality (which is most likely not needed) PD5 is used for the TX led on the board. PD6 This is ADC9, it has some timer input functionality, but its probably not of much use. it is found on arduino leonardo, so again skipped. PF0 This is ADC0, not a gpio pin, can only be used for reading analog voltages. PF1 This is ADC1, not a gpio pin, can only be used for reading analog voltages. Another thing is, this setup with one pin per button is an unneeded luxury. I could easily design a breakoutboard for the cheap pro micros, which could be labeled for all the buttons and have up to 8 buttons per analog pin. I also think its a slippery slope, not keeping it open-source, since guys like samco, did make his project open on github, which is neat, cause we'd then be able to develop it much further, should JayBee set aside the project at some point. Look im all for having a pre-compiled image, that people can just flash on specific boards and follow a simple guide, but those of us whom are tinkerers, should be able to customize it to their needs, which in turn could become features on newer versions. Heck i'd even be willing to send you some of the boards when i get around to ordering them (pay for shipping ofc). |
Mysli0210:
So I decided that I had nothing better to do than rewire the gun and can confirm that tracking works at at least 3 meters (that's how long a cable I have) that's with the 3 led spots I made. No interference from other lights like the buttons on my arcade. But as you might remember I didn't use the df robot camera but the wiimote one instead. So it does not have a housing that I can just rotate, mine is locked in with glue. the problem is that the entire coordinate system is mirrored which is the same as being rotated 180 deg. :dizzy: |
PL1:
--- Quote from: Mysli0210 on January 13, 2020, 05:04:25 pm ---I just went through all the pins specified in the original post, they are all found on the pro micro. --- End quote --- Sounds good. ;D The question still stands: What are the missing "functionalities" that JayBee referenced that would prevent using his firmware on a different 32u4 board? :dunno --- Quote from: Mysli0210 on January 13, 2020, 05:04:25 pm ---I also think its a slippery slope, not keeping it open-source, since guys like samco, did make his project open on github, which is neat, cause we'd then be able to develop it much further, should JayBee set aside the project at some point. Look im all for having a pre-compiled image, that people can just flash on specific boards and follow a simple guide, but those of us whom are tinkerers, should be able to customize it to their needs, which in turn could become features on newer versions. --- End quote --- I agree that open-sourcing the project would be great. If open-source is not an option, having the pre-compiled firmware use port connections that are available on all of the commonly-available 32u4 boards (like this firmware appears to do) increases usability. :cheers: Here's a handy chart to translate Arduino markings into 32u4 pins and ports. ;D - You may want to do something similar, JayBee, since some of the "Pin number" markings (A6-A9, A10) in the OP don't appear on these common 32u4 Arduino boards. Scott |
JayBee:
So to answer to your questions: The main compatibility problem is that most model of itsybitsy don't have NAND storage, which is needed to store important calibrations data. (Not sure about all model tho) Beside that for optimization purpose most of the library I use are especially written to work on the Atmega32u4, and won't work on other ones (the joystick mode for instance). Although I never tried on the ItsyBitsy 32u4 specifically, which seems to be a clone to the itsybitsy 32u4? If it's a clone it should work as is. The main reasons I choose the Atmega32u4 is that it's dirt cheap, has more than enough power and pins for this use, and has way more resources available than any other models. Now the reason why I decided to not share the code; I was indeed thinking about sharing it too like Samco did. I did it for my 2 points sketch that added many more functions than his. But you have to know that my sketch is massively different, way bigger and more complex. It took me hundred of hours to pull off the complex math needed to accurately and smoothly triangulate the aim position no matter the number of points (1~4), while taking care of other functions like rumble or recoil, all without any added lag or slowdowns. With all the numerous functionalities I added and am still adding, this solution is pretty much the most advanced in the market, sinden included, thanks to the auto calibration, the ultra low latency (5~7ms), and the plug and play aspect (no need to have a video processing device a special tool/driver or anything else). But I've worked as a dev long enough to know that if I release the sketch in the wild, there will always be people using that code to improve their own product or sell new ones. I definitely don't want people to make money on it. So unless you know a way for me to protect my code, I won't share it :embarassed: But if you guys want I can still make other firmwares compatible with different device or pinout. --- Quote from: Mysli0210 on January 13, 2020, 06:07:35 pm ---So I decided that I had nothing better to do than rewire the gun and can confirm that tracking works at at least 3 meters (that's how long a cable I have) that's with the 3 led spots I made. No interference from other lights like the buttons on my arcade. But as you might remember I didn't use the df robot camera but the wiimote one instead. So it does not have a housing that I can just rotate, mine is locked in with glue. the problem is that the entire coordinate system is mirrored which is the same as being rotated 180 deg. :dizzy: --- End quote --- You mean mirrored with my sketch? Or just as is? Did you test with samco's test sketch? The DF Robot cams have a big tilts issue, they aren't correctly oriented. But if you tell me how the axises are reversed I can make another firmware without the df robot inversion. |
Navigation |
Message Index |
Next page |
Previous page |