Main > Lightguns |
SAMCO DIY Arduino Powered IR Light Gun |
<< < (23/37) > >> |
JayBee:
--- Quote from: tomton on September 27, 2020, 05:17:39 pm ---Hi Samco, Thanks for your reply. I have spent more time with this today and tried to upload your sketch to Arduino nano and this produced loads of errors saying "error: 'AbsMouse' was not declared in this scope" Weirdly I don't get those errors when uploading to ItsyBitsy :dunno . I have tried redownloading AbsMouse but still getting those errors. I have tried doing this on another PC but still no luck... :banghead: Any idea? --- End quote --- I don't think the absmouse is compatible with nano? But it might be possible to fix that by manually modifying the library. |
tomton:
To me it looks like there is no communication between ItsyBitsy and PC. I have now uploaded "Test" sketch to ItsyBitsy and used it with "Processing" but I got all red buttons so as suggested I have tried different port numbers from 1 to 10 but "Processing" just keeps crashing saying --- Code: ---COM1 COM5 ArrayIndexOutOfBoundsException: "port number that I have tried" --- End code --- I think I'm either doing something very wrong or I'm using wrong board for this. Below link to the board that I'm using. https://www.ebay.co.uk/itm/Adafruit-Itsy-Bitsy-32u4-5V-16MHz/142656639851?hash=item2136ff936b:g:aBkAAOSwQwZaXF5a Any suggestions or help would be appreciated. |
samco:
Yeah, JayBee is correct. The nano is not compatible with the absmouse library. But the link to the board is the right board. When you upload test sketch do you get anything over the serial monitor? If not try this simple sketch that will just repeat "Hello world" in the serial monitor... void setup() { Serial.begin(9600); } void loop() { Serial.println("Hello world"); delay(1000); } Just to confirm that serial is working. |
tomton:
I should have said it earlier but I have tested my ItsyBitsy board with similar piece of code to yours and serial output worked fine. I finally got it working last night! Long story short my board for some reason was unable to provide 5V to the IR camera on pin5, under load it dropped to ~0.7V. When I wired camera directly to 5V supply the red LED lit on and tbh until then I didn't know it should be on :o . I have then wired IR camera positive directly to 5V pin on the board and it now works. Along the way it also turned out that on my camera SCL/SDA were the other way round (Green is SDA and Yellow is SCL). It works but still no shooting for me as I can't get it calibrated. Could be my dual monitor setup or Wii bar that I'm using which has more than two IR LEDs |
JayBee:
--- Quote from: tomton on October 01, 2020, 04:54:06 am ---I should have said it earlier but I have tested my ItsyBitsy board with similar piece of code to yours and serial output worked fine. I finally got it working last night! Long story short my board for some reason was unable to provide 5V to the IR camera on pin5, under load it dropped to ~0.7V. When I wired camera directly to 5V supply the red LED lit on and tbh until then I didn't know it should be on :o . I have then wired IR camera positive directly to 5V pin on the board and it now works. Along the way it also turned out that on my camera SCL/SDA were the other way round (Green is SDA and Yellow is SCL). It works but still no shooting for me as I can't get it calibrated. Could be my dual monitor setup or Wii bar that I'm using which has more than two IR LEDs --- End quote --- Ah yes, some boards simply don't have enough current available through the digital pins to power the cam. I always recommended to power i2c devices through either 5v or 3v3 power pins (depending of the device specs). For the calibration not working properly, have you check the cam orientation? I know most dfrobot cams have the up sticker on the wrong side (up sticker should be on the side, not up). I'd suggest adjusting it manually with the test processing app, because sometimes it's not even aligned correctly with the sticker. |
Navigation |
Message Index |
Next page |
Previous page |