I am relatively new to Arduino programming, but am capable of learning most anything quickly when there is a willing teacher. I have SOME level of knowledge where circuits are concerned, but essentially no idea how a serial-to-USB chip operates, how to access its internal structure or "firmware", potential for modification thereof, etc. I know what I am attempting is possible, because frankly anything is possible, so respectfully, I do not need to know any of the reasons that it "can't be done", I have experienced plenty of those. However, if someone would please work with me in determining how it can be done, it would be much appreciated.
Here's a brief explanation, then the question. Thank you.
I have recently undertaken a project that is for me somewhat of an entry into an serious level of programming/electronics, an assistive device geared toward aiding visually challenged individuals in object-detection. The beef of the design itself is nothing new. HC-SR04 ultrasonic range-detector, coupled with an Arduino Nano, as well as a 3.7 Lithium battery (secondary concern, for which I also need to determine the most basic charging circuit - perhaps I have, as now simply soldered to VIN and GND pins, and hoping it charges thoroughly when plugged in to wall charger [thanks]). This will in turn drive a vibrator motor for tactile input, duty cycle for the motor being derived from the HC-SR04 distance data (either some scale of pulses or RMS voltage manipulation through PWM, thus (hopefully) helping someone to construct (mentally) some sort of spatial model of the three-dimensional space around them, though I'm open to suggestions on that one, and THAT is where I have managed to become stumped. My intention is to mount this vibration unit inside a wall-charger, so that the charger can be unplugged from the wall socket, folded up and attached to the ankle or wrist of the device user while remaining plugged in to the arduino's USB port from which I need a usable signal, all without disrupting the devices ability to remain programmable through said port.
Having made it through my verbosity, (and thanks for doing so)... the beef:
How can one idle or unused USB-connector pin be used (without modification to the nano board) to transmit pulsed voltage to a motor (or anything else) housed within a wall-charger's plastic housing via an unused USB pin and cord conductor.
I am hoping to address this from a CODING, rather than hardware approach, and would greatly appreciate any help in achieving the desired result. I realize the programming involved is likely to be over my head, at least for right now, but if I am given some good direction and help, I'm sure I can solve this. For the record, I do plan to open-source this particular project upon it's completion, so maybe it'll help someone else too. Thanks again!
Bill Hawes.