I’m currently making a machine learning project with Google Colab; I want to connect Datastream for input Google Colab by parsing JSON format to CSV and sending it back to the dashboard webstream using a virtual pin
as you can see in this code, I’m using Blynk reference using token API but I feel it is wrong [Screenshot of code removed by moderator]
@Magama_Faberio please edit your post and replace the screenshot of your code with text, correctly formatted with triple backticks at the beginning and end so that it displays correctly.
Triple backticks look like this:
```
Copy and paste these if you can’t find the correct character on your keyboard.
# Ganti dengan token Blynk Anda
TOKEN = ''
# Ganti dengan ID Datastream Anda
DATASTREAM_ID = 'V12' # Ubah ini jika Anda menggunakan pin virtual yang berbeda
# Ganti dengan server Blynk Anda
SERVER = 'blynk-cloud.com:8080' # Ubah ini jika Anda menggunakan server Blynk yang berbeda
# Fungsi untuk mengirim data ke Blynk
def send_to_blynk(value):
# Buat URL untuk request
url = f'http://{SERVER}/{TOKEN}/update/{DATASTREAM_ID}?value={value}'
# Kirim request ke Blynk
response = requests.get(url)
# Cetak status request
print('Status:', response.status_code)
# Kirim hasil prediksi ke Blynk
for value in y_pred:
send_to_blynk(value)
blynk-cloud.com us the URL for the legacy Blynk servers tgat were decommissioned at the beginning of the year.
The post isn’t necessary.
The Blynk IoT servr URL is blynk.cloud but as there are multiple servers around the world, and your project only lives on one of them, you need to specify the regional subdomain as explained in the troubleshooting section of the API documentation…
i want to make the serial connection between my server and Blynk using API. I have read the datastream is in JSON format so I want to GET JSON and convert CSV in my server. after that send back the value in Model ML output from the server( back end) back to Blynk dashboard