Output LED not full brightness after reset

I created a simple app based on the example, and use the serial link to connect. After a reset of the arduino i can turn the onboard LED on and off using a button but it doesn’t glow full brightness. if i stop the app using the square and then hit the play again then it works full brightness again

 * 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 groups:              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 shows how to use ordinary Arduino Serial
 * to connect your project to Blynk.
 * Feel free to apply it to any other example. It's simple!
 * 1. Optional, but recommended.
 *    Connect additional USB-serial adapter to see the prints.
 * 2. Edit auth token and upload this sketch.
 *    Be sure to select the right port (there may be multiple).
 * 3. Run the script (it will redirect traffic to server):
 *      for Windows:         scripts/blynk-ser.bat
 *      for Linux and OSX:   ./scripts/blynk-ser.sh (may need to run with sudo)
 *    You can specify port, baud rate, and server endpoint like this:
 *      ./blynk-ser.sh -c <serial port> -b <baud rate> -s <server address> -p <server port>
 *    Run blynk-ser.sh -h for more information
 *    Attention!
 *        Arduino IDE may complain with "programmer is not responding".
 *        You need to terminate script before uploading new sketch.
 * 4. Start blynking! :)

// You could use a spare Hardware Serial on boards that have it (like Mega)
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11);
#define BLYNK_PRINT SwSerial
#include <BlynkSimpleSerial.h>
#include <SimpleTimer.h>

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

SimpleTimer timer;

void setup()
  Blynk.begin(auth, 9600);
   // Setup function to be called each 1000 milliseconds
timer.setInterval(1000, sendUptime);


void sendUptime()
// You can send any value at any time.
// Please don't send more that 10 values per second!
Blynk.virtualWrite(5, millis()/1000);

void loop()



I think the possible issue is that the pinMode was not called correctly. I updated the code on GitHub, so it should do it automatically now. Please update your library.

Also, you coud add pinMode for that particular pin in setup(), but it wasn’t necessary “by design” :slight_smile:

Hope this helps you!

Yep that update fixed the problem, thanks

1 Like