naylom / oilerexample Goto Github PK
View Code? Open in Web Editor NEWCode to implement an oiler for a lathe using an Arduino Uno
Code to implement an oiler for a lathe using an Arduino Uno
Want user to be able to force oiling to start
The debouce mechanism is measuring the time of the currennt PhotInterrupter input versus the last time it signalled. If this exceeds a predefined threshold the signal is included. In this case it should set the last time to now. This is not being done.
When in MACHINE_ACTIVITY_MODE, wait for N machine units to occur, start oiling and when complete want foir another n units - time should not be a factor
Currently each motor has an associated optical sensor with a related input pin. In the current code the input pins are monitored using attachInterrupt. On the Uno these are limited to 2 once pins 0 & 1 are used for a user display / input. The net result is this limits the number of motors to 2. To add more flexibility the code will be changed to use Pin Change Interrupts to dectect input from the optical sensors, Pin Change Interrupts can detect changes and generate interrupts on a greater variaty of pins and hence allow more motors. The two optional inputs from the machine being oiled will be moved to use the freed up pins 2 and 3.
Currently once the Oiler start oiling it waits for all motors to completed their target output (number of drips) before entering the mode waitinf for some restart criteria to be met. This means if one motors is not outputting then all will stop. In this error condition it is deemed better to allow a motor that has completed to be go into monitor mode and continue oiling when needed.
A result of this is that the Oiler will have an addtional state of PARTIALLY_RUNNING when the number of motors running > 0 and < NUM_MOTORS
When the optical sencor used to see if a motor has delivered output is read we get multiple readings rather than a discrete result.
Generate an alert when a motor has not completed its number of outputs in twice the time between restarting the oiler
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.