Programing c language

it is possibal to program bolt by c language.

No,it is not possible to program cpp in bolt website. However you can take data from bolt and do the neccesary cpp programming in the ubuntu server (in which you can install ubuntu if does not have it).
Follow the link to install ubuntu: https://amanpreetkaur2527.wordpress.com/2014/07/13/12/

Hi @ak12345569,

Yes, you can write C code to control your device using Bolt Cloud API. You can use the curl lib for doing the request to Bolt Cloud. Check the code below.

#include <stdio.h>
#include <curl/curl.h>
 
int main(void)
{

  CURL *hnd = curl_easy_init();

  curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(hnd, CURLOPT_URL, "https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/digitalWrite?pin=0&state=HIGH&deviceName=BOLT13819450");

  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "cache-control: no-cache");
  curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

  CURLcode ret = curl_easy_perform(hnd);
}

Refer these link https://curl.haxx.se/libcurl/c/simple.html
https://www.hackthissite.org/articles/read/1078

Do let me know in case you need any other information.

1 Like

Can we use c language in all Bolt projects like Light monitoring, temperature monitoring, anomaly detection, alert message via telegram etc.?

and if not I will recommend to Bolt to create one IDE in which we all can easily write program in c language so that more and more students can understand it very easy way because in JavaScript we have not aware it and not easy to understand and it it too lengthy.
In fact Some students do not know JavaScript, that’s why they do not purchase this training program.