Right after around 4 hours of pulling out hair ive done it so thought id share the end result, could probably be cleaned up but im a complete novice. The set up is an Arduino UNO, TMP36 and running over USB.
A few things being a beginner this was a tad tricky so will share too, changing the COMport and running over USB. Will do a youtube vid when i get time.
-Locate blynk-ser.bat file, mine is located, C:\Program Files\Arduino\libraries\Blynk\scripts. Make sure you have full admin rights, open and change line 6 to your COMport, if unsure open Aruduino IDE, hook up your board and click “tools” then hoover over “port” and replace line 6 value with yours, in my case COM3 instead of the default COM1, pay attention to capitals, click save (may have issues if not acting as admin).
-to run on USB you need to upload the code, then hold in reset, open the blynk-ser.bat file (same as above) in my case located, C:\Program Files\Arduino\libraries\Blynk\scripts, make a short cut… and release the reset button. Note to upload a new code you need to close blynk-ser.bat, upload then do the reset set again…
In the below code add your Auth code that you get from the app, the only thing you need to change. Note the middle leg of TMP36 is hooked up to A0 on the UNO.
This is running Celsius but for Fahrenheit remove the last line and add, temp = temp * 0.48828125;
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(2, 3); // RX, TX
#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[] = "5d97d0c0c3d34860a3715fa4968f8bfb"; // add your auth code from the app
float temp;
int tempPin = 1; //analog pin 1
SimpleTimer timer;
void setup()
{
Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth);
// Setup a function to be called every second
timer.setInterval(1000L, sendUptime);
}
// that you define how often to send data to Blynk App.
void sendUptime()
{
// shows the value temp on virtual pin 10
Blynk.virtualWrite(10, temp);
}
void loop()
{
Blynk.run(); // Initiates Blynk
timer.run(); // Initiates SimpleTimer
temp = analogRead(tempPin);
temp = ((temp * 0.48828125)-32)/1.8;
}
Thanks all for the help especilly Lichtsignaal and catoplepa to whom i used the code in this thread