The "Timer Setting" Widget is not recognized

I found on the internet a project that helps me, it is a kibble dispenser for cats.
I followed all the directions in building it but it works partially.
I contacted the designer but got no response.
The two deliveries linked to two times as expected in the sketch do not work, while it works if I press the external WS1 button or the widget associated with the one on the application that I have installed by installing the necessary widgets as per project.
Tamier Control widget is enabled.
The project uses an ESP8266 ESP-12E Node MCU, where I regularly install the sketch via Arduino IDE version 1.8.16.
As Blynk I use version 2.26.8 (1), because on my iPhone 6 with iOS 12.5.5.
I can’t install the new version.
The project link is:
http://www.brettoliver.org.uk

Greetings

Hey there, please edit your post and add triple backticks at the beginning and the end of your sketch, triple backticks look like this```

You’d be far better posting your actual code, correctly formatted with triple backticks, than posting a link to a website, especially when that link doesn’t take you to the project in question.

I assume that the this should say “Timer Control”?
There are two legacy widgets that have similar names - Timer and Time Input.
My guess is that you’ve used the wrong one.

You should be aware that the version of Blynk that you are currently using is no longer supported.

Pete.

I can’t post the code, I don’t know where to find triple backticks look like this``` on the Italian keyboard of my MAC.
With the current iOS of my iPhone I cannot install the new version of Blynk
Greetings.

Have you ever heard of copying and pasting?

Pete.

1 Like

John93 wrote me to do so

Yes, copy and paste the triple backticks that he kindly provided for you. Put them at the beginning and end of your code.

Pete.

/**************************************************************
 * Blynk is a platform with iOS and Android apps to control
 * Arduino, Raspberry Pi and the likes over the Internet.
 * You can easily build graphic interfaces for all your
 * projects by simply dragging and dropping widgets.
 *
 *   Downloads, docs, tutorials: http://www.blynk.cc
 *   Blynk community:            http://community.blynk.cc
 *   Social networks:            http://www.fb.com/blynkapp
 *                               http://twitter.com/blynk_app
 *
 * Blynk library is licensed under MIT license
 * This example code is in public domain.
 *
 **************************************************************
 * This example runs directly on ESP8266 chip.
 *
 * Note: This requires ESP8266 support package:
 *   https://github.com/esp8266/Arduino
 *
 * Please be sure to select the right ESP8266 module
 * in the Tools -> Board menu!
 *
 * Change WiFi ssid, pass, and Blynk auth token to run :)
 *
 *
 * Brett
 * v4 Added man switch to test feeding
 * v5 Added motor with gearbox for more torque
 * v6 Turned down int val from 1800 to 900 as it was resetting ESP8266 board
 * v7 Adds feed hopper guage hopper hold 34 feeds
 * v8 added reset to 24 on startup  and clock to show start date and time
 * v9 added calibration button to step a small amout so feed flep is horizontal and
 *  added seperate count for manual activations
 * v10 added correct formating for time
 * v11 added correct formating for date
 * v12 serial prints removed
 * v13 Timers added
 * v14 Add time last feed and removed serial prints
 **************************************************************/

//#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <WidgetRTC.h>
#include <TimeLib.h>
#include <SimpleTimer.h>

SimpleTimer timer;
WidgetRTC rtc;
//Brett setup stepper
#include <Stepper.h>
// change this to the number of steps on your motor
#define STEPS 400
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 5, 4, 0, 2);
int start = 14;
int hopperLevel = 34; // Hopper hold 34 feeds
int val = 900; // steps feed wheel 1/6th of a turn
int calval = 50; // steps to adjust feed flaps to hirizontal position
int manTrigger = 0;
int timerTrigger = 0;
int appTrigger = 0;
int timerEnable = 0;
int isFirstConnect = true;

// Brett end setup stepper

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxx";

// Your WiFi credentials.
char ssid[] = "yyyyyyyyyyy";
char pass[] = "zzzzzzzzzz";

// Digital clock display of the time and date feeder started
void clockDisplay()
{
if (isFirstConnect == true)
 {
 //Brett store stert time and date feeder started 
 // Time
 String displayhour = String(hour(), DEC);
  int hourdigits = displayhour.length();
  if(hourdigits == 1)
  {
    displayhour = "0" + displayhour;
  }
 String displayminute = String(minute(), DEC);
  int minutedigits = displayminute.length();  
  if(minutedigits == 1)
  {
    displayminute = "0" + displayminute;
  }

//Date

 String displayday = String(day(), DEC);
  int daydigits = displayday.length();
  if(daydigits == 1)
  {
    displayday = "0" + displayday;
  }
 String displaymonth = String(month(), DEC);
  int monthdigits = displaymonth.length();  
  if(monthdigits == 1)
  {
    displaymonth = "0" + displaymonth;
  }

 
  String startTime = displayhour + ":" + displayminute;
  String startDate = displayday + "/" + displaymonth + "/" + year();

  // Send time to the App
  Blynk.virtualWrite(V2, startTime);
  // Send date to the App
  Blynk.virtualWrite(V3, startDate);
  
  //Brett end store start time and date
 isFirstConnect = false;

 }
}

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
 // Begin synchronizing time
  rtc.begin();

  //Brett
   
  stepper.setSpeed(100); // set the speed of the motor
  pinMode(14, INPUT); // start feeding
  // turns off stepper motor at start
  digitalWrite(5,LOW);
  digitalWrite(4,LOW);
  digitalWrite(0,LOW);
  digitalWrite(2,LOW);
  Blynk.virtualWrite(V1, 34); // sets hopper level to 34 on startup
  Blynk.virtualWrite(V5, manTrigger);// sets man trigger count to 0 on start
  Blynk.virtualWrite(V9, timerTrigger);// sets timerTrigger count to 0 on start
  Blynk.virtualWrite(V10, appTrigger);// sets appTrigger count to 0 on start
  timer.setInterval(100L, clockDisplay); 
}

BLYNK_WRITE(V0)
{
  if(param.asInt() == 1) {
    doFeed();
  }
}

 BLYNK_WRITE(V8)// timer enable button
{
  if(param.asInt() == 1) {
    timerEnable = 1;
    Serial.print("Timer enable: ");
    Serial.println(param.asInt());
  }
    else
    {
    timerEnable = 0;
    
    Serial.print("Timer enable: ");
    Serial.println(param.asInt());
    
  }
} 

BLYNK_WRITE(V4)
{
  if(param.asInt() == 1) {
    doCalibrate(); // adjust feed flap small steps until horizontal
  }
}

BLYNK_WRITE(V6) //1st Timer Feed
{
  // You'll get HIGH/1 at startTime and LOW/0 at stopTime.
  // this method will be triggered every day
  // until you remove widget or stop project or
  // clean stop/start fields of widget
  Serial.print("Got a value: ");
  Serial.println(param.asInt());
 
  if (param.asInt()== 1 && timerEnable == 1 )// only operate if Timer Ctrl Button is on
  {
  doTimerFeed();
  }
  
}
BLYNK_WRITE(V7) //2nd Timer Feed
{
  // You'll get HIGH/1 at startTime and LOW/0 at stopTime.
  // this method will be triggered every day
  // until you remove widget or stop project or
  // clean stop/start fields of widget
  Serial.print("Got a value: ");
  Serial.println(param.asInt());
 
  if (param.asInt()== 1 && timerEnable == 1 ) // only operate if Timer Ctrl Button is on
  {
  doTimerFeed();
  }
  
}
 
 void doFeed() // rotate feeder 1/6th revolution to release feed
 {
 // turns feed flaps 1/6th turn
  stepper.step(val);
 // turns off stepper motor
   digitalWrite(5,LOW);
  digitalWrite(4,LOW);
  digitalWrite(0,LOW);
  digitalWrite(2,LOW);
  hopperLevel = hopperLevel - 1 ;
   Blynk.virtualWrite(V1, hopperLevel);
   appTrigger = appTrigger + 1 ;// add 1 to appTrigger count
   Blynk.virtualWrite(V10, appTrigger);
   lastFedclock();
 
 }

void doManFeed() // rotate feeder 1/6th revolution to release feed
// updates hopper level and mantrigger counter
 {
 // turns feed flaps 1/6th turn
  stepper.step(val);
 // turns off stepper motor
   digitalWrite(5,LOW);
  digitalWrite(4,LOW);
  digitalWrite(0,LOW);
  digitalWrite(2,LOW);
  hopperLevel = hopperLevel - 1 ;
   Blynk.virtualWrite(V1, hopperLevel);

  manTrigger = manTrigger + 1 ;
  Blynk.virtualWrite(V5, manTrigger);
  lastFedclock();
   
 }

void doTimerFeed() // Timer feed rotate feeder 1/6th revolution to release feed
// updates hopper level and timertrigger counter
 {
 // turns feed flaps 1/6th turn
  stepper.step(val);
 // turns off stepper motor
   digitalWrite(5,LOW);
  digitalWrite(4,LOW);
  digitalWrite(0,LOW);
  digitalWrite(2,LOW);
  hopperLevel = hopperLevel - 1 ;
   Blynk.virtualWrite(V1, hopperLevel);

  timerTrigger = timerTrigger + 1 ;
  Blynk.virtualWrite(V9, timerTrigger);
  lastFedclock();
   
 }

 void doCalibrate()
 {
   // adjust feed flap small steps until horizontal
  stepper.step(calval);
 // turns off stepper motor
   digitalWrite(5,LOW);
  digitalWrite(4,LOW);
  digitalWrite(0,LOW);
  digitalWrite(2,LOW);
  
 }

 // Digital clock display of the time and date last fed (man app or timer)
void lastFedclock()
{

 //Brett store stert time and date last fed
 // Time
 String fedhour = String(hour(), DEC);
  int hourdigits = fedhour.length();
  if(hourdigits == 1)
  {
    fedhour = "0" + fedhour;
  }
 String fedminute = String(minute(), DEC);
  int minutedigits = fedminute.length();  
  if(minutedigits == 1)
  {
    fedminute = "0" + fedminute;
  }

//Date

 String fedday = String(day(), DEC);
  int daydigits = fedday.length();
  if(daydigits == 1)
  {
    fedday = "0" + fedday;
  }
 String fedmonth = String(month(), DEC);
  int monthdigits = fedmonth.length();  
  if(monthdigits == 1)
  {
    fedmonth = "0" + fedmonth;
  }

  String fedTime = fedhour + ":" + fedminute;
  String fedDate = fedday + "/" + fedmonth + "/" + year();

  // Send time to the App
  Blynk.virtualWrite(V11, fedTime);
  // Send date to the App
  Blynk.virtualWrite(V12, fedDate);
  
} // End Digital clock display of the time and date last fed (man app or timer)
 
void loop()
{
  Blynk.run();
  timer.run();

    // get the man switch value
  if (digitalRead(start) == HIGH) // feeds and updates the hopper level/man trigger count on manual trigger
 {
 
doManFeed();   
 }
}

Done! Thanks

Which widget type have you used for the widget attached to pins V6 and V7 ?
How have you configured these widgets in the app (attach screenshots from the app).

Pete.


Are these.

Lello

The delivery of the croquettes works.
It does not update the “Timer Feed” counter.

Lello