• HOME
    • PROJECT
    • ABOUT
    • CONTACT
    • ASSIGNMENT
    • HOME
    • PROJECT
    • ABOUT
    • CONTACT
    • ASSIGNMENT

      Embedded programming

      An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. Embedded systems control many devices in common use today.

      Embedded programming is a specific type of programming that supports the creation of consumer facing or business facing devices that don't operate on traditional operating systems the way that full-scale laptop computers and mobile devices do.

      Arduino ide

      #include "HX711.h"
      #include 
      float calibration_factor = 2230; // this calibration factor is adjusted according to my load cell
      float units;
      float ounces;
      // Define our data and clock pins
      #define DOUT 0 // D2 maps to GPIO4
      #define CLK 2 // D1 maps to GPIO5
      // Initialize our HX711 interface
      HX711 scale(DOUT, CLK);
      // WiFi network name and password
      const char* ssid = "hackerw"; // your wifi SSID name
      const char* password = "kigali123" ;// wifi pasword
      const char* server = "api.thingspeak.com";
      WiFiClient client;
      void setup() {
          Serial.begin(115200);
          WiFi.begin(ssid, password);
          Serial.println();
          Serial.print("Connecting");
          while (WiFi.status() != WL_CONNECTED) {
              delay(1000);
              Serial.print(".");
          }
          Serial.println("success!");
          Serial.print("IP Address is: ");
          Serial.println(WiFi.localIP());
        scale.set_scale();
        scale.tare();  //Reset the scale to 0
      
        long zero_factor = scale.read_average(); //Get a baseline reading
        Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
        Serial.println(zero_factor);
      }
      
      void loop() {
      scale.set_scale(calibration_factor); //Adjust to this calibration factor
      
        Serial.print("Reading: ");
        units = scale.get_units(), 10;
        if (units < 0)
        {
          units = 0.00;
        }
        ounces = units * 0.035274;
      //  Serial.print(units);
      //  Serial.print(" grams");
      
        
          float data = units;
          Serial.println(data);
          Serial.print(" grams");
          Serial.println();
          sendWeight(data);
       
          //delay(1000);
      }
      int sendWeight(float data) {
          if (client.connect(server, 80)) {
              String apiKey = "7O63U4GNTKJ8JBDP";
              
              String body = "field1=" + String(data, 2);
      
              client.print("POST /update HTTP/1.1\n");
              client.print("Host: api.thingspeak.com\n");
              client.print("Connection: close\n");
              client.print("X-THINGSPEAKAPIKEY: " + apiKey + "\n");
              client.print("Content-Type: application/x-www-form-urlencoded\n");
              client.print("Content-Length: ");
              client.print(body.length());
              client.print("\n\n");
              client.print(body);
              client.print("\n\n");
              //Serial.println("DONE");
          }
          client.stop();
          Serial.println("Waiting...");
          delay(3000);
      }
      						

      Web interface

      i was supported to my web appsbut i don't have enough time to build it.

      But again i try to upload my data from weight sensor to the platform which call thingspeak.

      Thingspeak

      ThingSpeak is an open source Internet of Things (IoT) application and API to store and retrieve data from things using the HTTP protocol over the Internet or via a Local Area Network. ThingSpeak enables the creation of sensor logging applications, location tracking applications, and a social network of things with status updates".

      ThingSpeak is the open IoT platform with MATLAB analytics.

      About Us

      My name is NSABIMANA Ziadi, I am Rwandan people Read More.

      Our Info

      • E-mail:nsabimana.ziadi@gmail.com | ziadi@fablab.rw
      • Address: Telecom House, 6th floor, 8 KG 7 Ave, Kigali
      • Telephone:+250781044202

      Follow Us

      • Twitter
      • Facebook
      • Google Plus
      • Whatsapp
      • instagram

      © Copyright 2018 | Ziadi | All Rights Reserved. Designed by NSABIMANA Ziadi