a project to be in control and notified of what the EZpass is exactly doing in that suspicious little white box
I think this is just cool
Portable Network Graphics (PNG) - 309.32 kB - 07/07/2016 at 05:57
Compiling Code for a trinket to run the Neopixel ring Outputs and the Master Read/Slave write code to get it info on when tis supposed to do what.
ino - 3.51 kB - 07/06/2016 at 04:12
So I've never played with Fritzing befoer, and its a very cool program. I laid out my breadboard and it then guide me through creating a schematic... its functionally correct, but i'm going tto make my own so the interconnects are a bit more logical, and then it even creates a 2 sided pcb of the project for you, kind of, you have to lay it out, but the autotrace function is pretty sweet.
Its very cool, and the Fritzing graphic has been added in the project.
I really like the PCB option, and its tempting, but i want to see what it would take to breakout the GPS module before i commit to having a PCB made, SIngle shot PCB's are expensive, worth it for a great, functional project, but at $30 a pop or higher, is not cheap.
Neopixel code is always hard to figure out for me. I think my head wants to make it harder than it is, except i can't get it to compile. I'm posting it as version 01 in the files section.
I like using the switch cases and calling functions for the events, it gives me some control over what's going on, for example, by excluding the check for a new variable, i can get all the cycles i want on the Larson scanner for the scan indicator, but the arduino IDE doesn't seem to like it. I'm getting a lot of "Not declared in this Scope" alarms
Also, this s the first time I've tried to code with0 the Wire library over the I2C lines between arduinos. Obviously i'm not ready to bench test it yet, as my code is still in need of some lovin', but its been interesting to learn about. I made the decision to have the neopixels be a Master Read/Slave Write relationship with the logic/servo arduino.
Yes, i could try to do all this on one arduino, but i can through a trinket in there to handle my 12 neopixels and simplify this so much. besides, i think this will be great practice for tackling a magnet north belt using very small vibromotors and 12C motor controlloers, but that won't be started until after this project is functional at least, if not finished.
I am going to keep working on this code, and then do up the wiring in fritzing, if i can figure that out, so it'll look spiffy and well documented.
Edit: So figured it out, Fun Fact; Arduino code wants a ; after a got label's :, i.e.
is right, weird, huh? so my code compiles, Yeah! now to make the other side of code, the button, servo, and i2c write side of the comms.
When writing a program, I find it very helpful to list out all the features i want and how i want them to interact with the project.
Hacked E-Zpass input when E-Zpass is Polled
Switch - to drive Case shutter up and down
Microswitch x2 - indication of open and close position of shutter
- Detect a poll of E-Zpass, then indication on Neopixel ring via a red LED making a few circles, larson scanner like
- On/Off Indication - if shutter is up(microswitch) Green LED on top of Neopixel ring, if shutter is down, and EZPass blocked, red led on bottom of ring.
-Switch, when up, shutter is up(driven by a servo going from 0-90 degrees) when down, shutter is down.
-after a time(10 seconds) if shutter actual position(microswitchws) does not match switch position, or if neither microswitch is engage, indicate failure by two slow flasshing yellow LEDs on either side of Neopixel LED ring.
Future Features to be added:
- Passthru charger and Lion battery in case cable gets jiggled.
- GPS and SD card to hold position of tolls and open shutter automatically within 1/4 mile radius of known toll locations. a button will be needed to add new toll stations to GPS log.
-Software Defined Radio(SDF) to detect E-Zpass Polling so i can sense polling without being polled and without hacking/damaging E-Zpass in future.
-Small OLED screen for text indications as well. might be very useful with GPS and SDF.
I still haven't decided which Arduino to go with... I need to layout the hardware requirements for this project out and make sure it can support the future features as well.
The first task is to make this electrically work. I need to get the arduino, the Neopixels, the EZpass tag, and the servo all working in tandem. I won't be able to test the EZpass detection until i'm on the road, but i can spoof it with a switch for proof of concept.
Time to break out the breadboard and the perfboards.