Jump to content

davidb

Member
  • Posts

    183
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Ribble Valley
  • Interests
    Help slow the spread of #COVID19 and identify at risk cases sooner by self-reporting your symptoms daily, even if you feel well ?. Download the app https://covid.joinzoe.com/

Previous Fields

  • Boat Name
    Gladiator
  • Boat Location
    Silsden

Recent Profile Visitors

4208 profile views

davidb's Achievements

10

Reputation

  1. "You can follow the track through the farm if you want to go the pub. " That farmyard is amazing. The track is on bedrock and the The foundations for the barn are are carved out of the bedrock as well.
  2. We ascended the Wigan flight on Thursday 29th April with great help from the Wigan Flight Crew, thanks again for a great service, it took less than a morning starting at 8 am. Yesterday we went up the Johnson's hillock flight single - handedly and it was an absolute pleasure with not rushing it and taking in the wonderful views. All the equipment, gates, paddles, ladders etc were in excellent condition and worked smoothly with very few leaks. Well done C&RT and predecessors for keeping this historic infrastructure so well. The builders of the canal did a great job in the first place, they even went to the trouble of recessing the bollards on the bottom lock landing to resuce the trip hazard:
  3. We did the link a fortnight ago and ascended the Wigan flight on Thursday with great help from the Wigan Flight Crew, thanks again for a great service! There are not enough Ribble Link videos available on YouTube yet, so here is my contribution, mainly experimenting with an old GoPro:
  4. Thanks for the offer, but it will be Saturday earliest when we ascend. We should be at Crooke weds afternoon I have joined that fb group today, looks very helpful. D
  5. That's all good news, thanks a lot, David
  6. Good Morning, We shall shortly be ascending the locks at Wigan in our narrowboat, Is anyone else planning to go that way in the next week or so? Also, I seem to remember there used to be some volunteers who came to help, does that still happen? I hope there is still water at the top when we get there!
  7. Trying to troubleshoot this code again and running various things though the serial monitor (on right of screenshot) - the millis are inceasing normally, but it isn't returning anything for currentMillis or previousMillis, but the interval is printing correct at 4000. While running the sketch, everything is fine but holding the button pressed extiguished the alarm, but it comes back within a second when released. I'll try and find a tutorial on millis now
  8. Textwrangler has been superceded by BBedit which won't work on my old Imac or Macbook, I shall see if it works on a Win7 laptop later. Otherwise, do you have any other suggestions please? I have got http://www.sublimetext.com running but it looks like another steep learning curve for me at first glance. thank you, David
  9. We are also stuck at Garstang and are booked in to cross the Ribble on Friday, 16th April. I'll look out for you in the meantime, David Speak to the boatyard at Tarleton. That's where we got our pilot from. According to my 'book' I spoke to Roger at the yard 07885 762347 That number is still current for Roger and the boat that can escourt you (with a big Cummins engine and is well able to tow narrowboats) is moored there, its the first boat you pass coming down on the left after the visitor moorings, There is a grainy picture of it on this old website.
  10. I have put what I think are my problem areas in red bold, near the bottom. I still don't get any arduino IDE colours in the forum's file attachment area, but of course I could do a screenshot of the problem area if required, thanks for looking, D __________________________ //millis25Mar int stoke = 2; // INPUT Stoking Temp Sensor (Bottom of store) int houseUFH = 3; // OUTPUT UFH Relay ( not involved with millis problem) int runPin = 4; // INPUT Heat Available for distribution stat (Top of accumulator tank 56deg) int alarm = 7; // OUTPUT Alarm Light Relay int veryHot = 9; // INPUT Boiler too hot 85deg int logStoreUFH = 10; // OUTPUT Log Store UFH Relay (heat sink for excess heat) int butt = 12; // INPUT from alarm cancel Button int buttonPressed = 0; int ledPin = 13; // OUTPUT Indicator (built in LED) unsigned long previousMillis = 0; // will store last time LED was updated const long interval = 40000; // interval at which to blink (milliseconds) int dt = 100; // Delay of 100 milisecs void setup() { Serial.begin(9600); pinMode(stoke, INPUT); // stat acts 70deg pin 2 pinMode(houseUFH, OUTPUT); // Yellow Relay Wire pin 3 pinMode(runPin, INPUT); // stat acts at 56deg pin 4 pinMode(alarm, OUTPUT); // Blue Relay Wire pin 7 pinMode(veryHot, INPUT); // stat acts at 85deg pin 9 pinMode(logStoreUFH, OUTPUT); // Green Relay Wire pin 10 pinMode(butt, INPUT_PULLUP); // cancel button pin 12 (with external pull up resistor) pinMode(ledPin, OUTPUT); // Indicator LED pin 13 } void loop() { delay (dt * 5); unsigned long currentMillis = millis(); int analog = analogRead(myPin); // Reads data from myPin (A2) pin and puts in analog Int int readRun = digitalRead(runPin); // Reads data from runPin (4) and puts it in readRun Int int readStoke = digitalRead(stoke); // Reads data from stoke (2) and puts in readStoke Int int readAlarm = digitalRead(alarm); // Reads data from alarm (7) and puts in readAlarm Int int readHot = digitalRead(veryHot); // Reads data from veryHot (9) and puts it in readHot Int int readButt = digitalRead(butt); // Reads data from butt (12) and puts it in readButt Int Serial.print(" Stoke = "); // next 6 lines for printing to serial monitor Serial.println(readStoke); Serial.print(" button pressed = "); Serial.println(readButt); Serial.print(" Millis = "); Serial.println(millis()); if ((readStoke == 0) && (readButt == 1)) { // boiler is too cold and button is untouched Serial.println("Boiler Requires Stoking"); digitalWrite(ledPin, HIGH); // starts indicator LED flashing delay (dt); digitalWrite(ledPin, LOW); delay (dt); // ends indicator LED flashing digitalWrite(alarm, HIGH); // lights alarm light pin 7 } if (readButt == LOW) { // when the button is pressed set buttonPressed to 1 buttonPressed = 1; // if the temperature is too low have the criteria that the cancel button has also not been pressed. // this is Jen's addition, not sure of the logic here! digitalWrite(alarm, LOW); // illuminates alarm lED if (currentMillis - previousMillis >= interval) { // saves the last time alarm was triggered digitalWrite(alarm, HIGH); // not sure of this either! to reset buttonPressed to zero when the temperature } // recovers, so it will alarm again the next time it drops too low. else { digitalWrite(ledPin, LOW); digitalWrite(alarm, LOW); } } }
  11. loop if (boiler too cold, nothing to do with reset button) if (last reset outside permitted interval, ie 20minute delay) set alarm end if if (reset button pressed) cancel alarm set time since last reset to now end if else cancel alarm (ie boiler temp OK) end if end loop yes, the above is correct, thanks, I'll try the auto formatting tonight, cheers, David
  12. Yes, as above when the boiler needs stoking and the button isn't pressed
  13. //millis23Mar int myPin = A2; // INPUT Analogue Sensor int stoke = 2; // INPUT Stoking Temp Sensor (Bottom of store) int houseUFH = 3; // OUTPUT UFH Relay int runPin = 4; // INPUT Heat Available Temp Sensor (Top of store) int alarm = 7; // OUTPUT Alarm Light Relay int veryHot = 9; // INPUT Boiler too hot int logStoreUFH = 10; // OUTPUT Log Store UFH Relay int butt = 12; // INTPUT from Cancel Button int buttonPressed = 0; int ledPin = 13; // OUTPUT Indicator LED unsigned long previousMillis = 0; // will store last time LED was updated const long interval = 40000; // interval at which to blink (milliseconds) int dt = 100; // Delay of 500 milisecs void setup() { Serial.begin(9600); pinMode(myPin,INPUT); // pin A2 pinMode(stoke,INPUT); // stat acts 70deg pin 2 pinMode(houseUFH, OUTPUT); // Yellow Relay Wire pin 3 pinMode(runPin, INPUT); // stat acts at 56deg pin 4 pinMode(alarm, OUTPUT); // Blue Relay Wire pin 7 pinMode(veryHot, INPUT); // stat acts at 85deg pin 9 pinMode(logStoreUFH, OUTPUT); // Green Relay Wire pin 10 pinMode(butt,INPUT_PULLUP); // cancel button pin12 pinMode(ledPin, OUTPUT); // Indicator LED pin13 } void loop() { delay (dt*5); unsigned long currentMillis = millis(); int analog = analogRead(myPin); // Reads data from myPin (A2) pin and puts in analog Int int readRun = digitalRead(runPin); // Reads data from runPin (4) and puts it in readRun Int int readStoke = digitalRead(stoke); // Reads data from stoke (2) and puts in readStoke Int int readAlarm = digitalRead(alarm); // Reads data from alarm (7) and puts in readAlarm Int int readHot = digitalRead(veryHot); // Reads data from veryHot (9) and puts it in readHot Int int readButt = digitalRead(butt); // Reads data from butt (12) and puts it in readButt Int Serial.print(" Stoke = "); Serial.println(readStoke); Serial.print(" button pressed = "); Serial.println(readButt); Serial.print(" Millis = "); Serial.println(millis()); if ((readStoke == 0) && (readButt == 1)){ Serial.println("Boiler Requires Stoking"); digitalWrite(ledPin,HIGH); // starts indicator LED flashing delay (dt); digitalWrite(ledPin,LOW); delay (dt); // ends indicator LED flashing digitalWrite(alarm,HIGH); } // lights alarm light pin 7 if (readButt == HIGH) { buttonPressed = 0; digitalWrite(alarm,LOW); if(currentMillis - previousMillis >= interval) { // save the last time digitalWrite(alarm,LOW);} else{ digitalWrite(ledPin,LOW); digitalWrite(alarm,LOW); } } } So that is the current sketch, plenty of delays so I can read that the button press now gives 0 and other stuff in the serial monitor. I am not bothered at present about the ledPin, its just the alarm I would like to sort. Currently, when readStoke=0 the led is flashing about twice a second and the alarm led is not working at all While the button is held down, the only effect is that it stops the ledPin flashing I'm sure all my problems are in the last 20 lines. thanks for looking, D
  14. yes, you were correct, I just fiddled about adding and removing curlys till it worked. Its very odd at times, but incredibally clever overall. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.