This is a link to the emergency stop function.
http://rovjacobsnotes.blogspot.com/p/emergencystop-function-in-balisktank.html
For now all that it does is turns my servo. Later I may huck a watchdog timer.
Sunday, February 7, 2016
Wednesday, February 3, 2016
Servo 1.1 four main code pressure regulator
I will be adding my server 1.1 Arduino code into my ballast tank test code.
In the process of converging these two codes I will make notes on what comments have been added to which lines. Note it's unlikely the lines will say the same but the general area or functions well in laissez later remark specifies.
In the process of converging these two codes I will make notes on what comments have been added to which lines. Note it's unlikely the lines will say the same but the general area or functions well in laissez later remark specifies.
- Line 8 #include <Servo.h> --Remove from line 8; already in previous code online 79 under loop
- Line 41 String serial;// Used in AirRegulatorServo()
- line 42 add Servo myservo;// Used in the air systam sorvo. see about oving this.------------------
- Line 49 myservo.attach(9);// Used in AirRegulatorServo() Set Pin, Defalt: 9. ------------------------See about moving this into the function AirRegulatorServo(). At a later time
- Line 134 Add reference to AirRegulatorServo(serial); under loop------------------------------------- see about adding a condition to running this function.
- Line 582 Add function
int AirRegulatorServo(String serial){
}
else serial = "90";
if(serial.toInt()<90){
myservo.write(serial.toInt()-4);
}
else myservo.write(serial.toInt());
delay(500);// Temp remove after tested.
}
This will be modified at a later time.
This function is still in progress and will be updated regularly here on my online notebook.
Momentarily problem the servo is spending without apparent merit.
Partial solution by default serial is zero and not what's required for stationary which is 90.
Momentarily problem the servo is spending without apparent merit.
Partial solution by default serial is zero and not what's required for stationary which is 90.
- Line 115under loop change serial = "0" to serial = "90".
Air regulating servo
Air regulating servo
The servo will be used to manage the pressure regulator. The servo SM-S4315R has the capability of continuous rotation and is ideal for this application figure 1.
Figure 1: SM-S4315R servo
The code used is available (here). This shows the basic functionality. In order to have the servo rotate clockwise send a integer between 0 and 89, to prevent the servo from rotating send 90 via serial port, and to rotate counterclockwise any integer between 91 and 180. Farther the number is from 90 faster the servo will rotate.
Click (here) for more details.
Subscribe to:
Comments (Atom)