Jump to content


Ming Batt

Member Since 23 Nov 2016
Offline Last Active Apr 13 2019 06:44 PM

Posts I've Made

In Topic: Nerf Hera Microswitch

01 August 2018 - 08:46 PM

You could use this: https://suild.com/shop/0. Easier than any microswitch and it'll take you less than 5 minutes to install. Here's a super simple tutorial too: https://www.youtube....?v=ql-5Qpvs0HA


In Topic: Computer Vision Accuracy Measurement Software

16 January 2018 - 10:16 PM

I think you can streamline this process a bit more to have your computer do all of the work. As you said, a simple mic placed near the wall, plugged into your computer to record when the dart hits the wall will work perfectly. A webcam, either the laptop's or an external one, faces the white wall. Maybe put an object in the center of a different color than the dart for the blaster to aim at. At the start of the execution of the program, OpenCV can look for this centering object for reference later on. The python program, using a real-time audio analysis library (checkout pyAudioAnalysis: https://github.com/t...pyAudioAnalysis or librosa: https://github.com/librosa/librosa), will listen for when a dart hits the wall. When the dart hits, use OpenCV to look for the dart (super simple, use color or something) and save those coordinates. With these coordinates (as well as the coordinates of the centering object), use a simple 2d drawing library to draw all the points. Since you have the position of every dart and the center point, you can do some maths for some cool statistics.

 

EDIT: spelling


In Topic: Another Nerf-puter project

02 May 2017 - 11:58 PM

Nice! I am jealous of how well organized your code is (my 'training' if you call it that, is very informal... a googled expansion from one semester of C in college LOL). The optic setup is almost ideal isn't it? I found it after researching several 'Arduino chrono' projects. I honestly got a bit worried when it started to get a weak signal at >1.25" separation, but it's just a nerf gun. So upping forward current to near max continuous rating was an easy decision, LOL. Screw playing with discretes, analog amps, ...bah! Optek stuff rocks!

 

I'm curious to see how you went about the wireless part. I've got an assortment of spare 'robotic' radios I could play with (433,2.4,SPI,UART,ESP82xx, etc)... I thought it would be cool to develop a system that has various attachments (barrel sensors, red dot screens, etc) and guns (firing mechanisms, motors, etc) essentially 'talking to each other'. Unfortunately that would take more time that I alone have to put in to this stuff. Although if someone is already started, I don't mind donating some lines of code. This idea could be developed to include GPS, inter-troop data sharing... a modern comprehensive networked battle system for nerfers LOL! How cool would that be, to glance down at your phone and see your friendly positions, last known enemy positions, friendly ammo counts, etc? That would be a real advantage IMHO... and I bet there are nerfer clans who would demand to have it if it was available.

 

OTOH, a simple 'look ma no wires' application could be fun... for example a pair of 328's linked via NRF radios (or whatevers ya' got on hand), one reading the sensor and processing data, the other displaying data on a screen (and possibly responding to muzzle data for physical 'on gun' functions... ex. killing flywheels when the clip is empty). Nobody likes wires, and this idea could remain modular (just keep the gun specific code on the gun uC, and leave the muzzle code generic so it works with many gun/sight setups). My guess is something like that would be enough to meet all needs of the average nerfer. 

 

So many ideas, so little time. I think my next step on this project will be to play with controlling my son's stryfe motors using AnalogWrite(). That's a more reasonable goal to reach in a couple free weekend hours (whenever that comes next).

 

Kevin

 

Haha thanks! I actually do not have too much formal training myself, just self-taught starting at 12, and it's been 4 years since that. Not too much opportunity at my school either, just got rejected from the AP Computer Science course at my school for "knowing too much". Not too much experience in electronics or electrical engineering though (learning from Khan Academy), although I do know a bit of the basics. I'm always learning more, though, so I can make something even cooler in the future. The display's weird angling makes display placement much more difficult and awkward for, but the size seem

 

Your code doesn't look too bad at all, it's just some aspects really annoy me, like the single-line variable declaration, although that's needed for the comments, and the "uint8_t", and some lengthy variable declarations. Maybe it's just the JavaScript developer in me, but C/C++ really annoys me sometimes. Personal preference, I suggest to move that display code into another file. Once it's written, it basically acts as a library, so you won't need to edit it. It helps make your code a lot more readable and manageable. Conventionally speaking, the declarations are usually placed in a separate C++ file, <fileName>.h, and the logic and the definitions are placed in another file, <fileName>.cpp. A lot of the code is looks repetitive, but it looks necessary for that nice data table.

 

I really like how you read the voltage after every shot! I never thought of that. A lot of my electronics work is also still a lesson in physics as well, since the only physics course I took was probably designed for middle schoolers.

 

To implement the wireless feature, I have some 433MHz radio transmitter and receiver modules, which are super Arduino-friendly. Transmitting data between two Arduinos can get a bit messy, and I'm still learning, but so far, I've been more interested in the physics of electromagnetic radiation than radio communication, both of which stemmed from learning how to use the the radio modules. I'm trying to learn how UART, SPI, I2C, and other communication protocols function as well. I think it would ultimately be easier if I hook up a couple ESP8266's that I have to some FireBase real-time database or something, or probably some sort of local server. This is where my backend experience is useful! In IoT! With this...I think you can see where I'm going. Remote control NERF blaster army, and more. I would like to develop something like a network battle system, using the ESP's since that would give me an excuse to practice more React and React Native. You just gave me an awesome idea! I think that would have some implementation into VR as well...

 

Expanding upon the idea of modularity, I also strive for that as well. It's always the vast permutations which keeps things interesting. I've made a barrel attachment which houses an IR gate, but communicates to the microcontroller with wires. I want to design a circuit which communicates to the microcontroller, specifically in the blaster, wirelessly. The end goal where the IR gate data encapsulated within the barrel attachment would be able to connect to different blasters, so all that's necessary is the correct hardware within the blaster to be able to communicate and connect to the barrel attachment. Communicating with a separate microcontroller in the some sort of optic which houses the display would be the simplest tasks, since only integers, or at most strings, would be transferred. Actually, now that I think of it, strings would not be necessary at all, just some boolean and number values. Also, leaving all the inputs on the optic housing the display, such as select fire modes, magazine size toggle button, or whatever blaster functions desired to be manipulated, would be much easier labor-wise, as the display housing could ultimately be 3d printed to specific specifications.

 

A completely modular, wireless blaster attachment system would be the coolest! Hope to get all of that done over the summer. Planning on working on some sort of quadcopter with onboard blasters, just for fun, and maybe for college acceptance, if personal projects even mean anything.


In Topic: Another Nerf-puter project

15 April 2017 - 11:32 PM

I've been working on the exact same thing, ammo counter/chrono/voltmeter all in one, (https://github.com/etnom/ming-batt) and even in that same optic, haha. I just haven't found the time to work on the hardware. Mine includes a wireless barrel attachment and optic, but this is amazing!

 

It must've been a pain writing all the display functions and initialization, I use two libraries for a similar display, in case it may come in handy:

- https://github.com/a...afruit_SSD1306:OLED driver library

- https://github.com/a...it-GFX-Library:Graphics library


In Topic: Ammo Counters Problem

06 March 2017 - 07:55 PM

What's the counting mechanism? If it's a switch behind the trigger, would its distance from the motors be far enough to not receive any EMI?
If the counting mechanism is through an IR gate, I'm assuming it's physical location is near the motors. Since I don't have too much experience with your setup, could the motors generate enough heat to mess with the IR readings?