Posts

IoT simulation which will record the movement and orientation of phone and give feedback

Image
IoT simulation which will record the movement and  orientation of phone and give feedback in Tinker Cad with code Tinker Cad Circuit Design: Component Requirements: 1) Arduino Uno R3 2) Micro Servo 3) Potentiometer 250 Kilo Ohms Code for the Circuit: #include <Servo.h> #include <SoftwareSerial.h> int pos = 0; int sensorValue = 0; int i = 0; Servo servo_9; void setup(){   servo_9.attach(9);   pinMode(A0, INPUT);   pinMode(13, OUTPUT);   Serial.begin(9600); } void loop(){       sensorValue = analogRead(A0);    pos = map(sensorValue,0,1023,0,180);      for (i = 0; i <= pos; i++) {   if(i == 90){     Serial.println("Landscape");     } else if( i == 180 || i == 0){       Serial.println("Portrait");     }     servo_9.write(i);     delay(15);    }   for (i= pos; i >= 0; i --) {     if(i == 90){     ...

Communication between two embedded devices using UART port with code

Image
 Communication between two embedded devices (Arduino Kit) using UART port with code Components Required: 1) Arduino Uno R3 (x2) 2) Push Button 3) Resistor 220 Ohm 4) Breadboard Mini (x2) 5) Led Code for Circuit: Code for Arduino Uno 3 - connected with push button void setup() {   //set push button pin as input   pinMode(6, INPUT_PULLUP);    //initialize UART with baud rate of 9600 bps   Serial.begin(9600);        } void loop()  {   {   if (digitalRead(6) == HIGH)     {       Serial.write('0');       Serial.println("HIGH");     }   else     {       Serial.write('1');   Serial.println("LOW");     }   }   delay(100); } Code for Arduino Uno 3 - connected with led void setup() {   //set LED pin as output   pinMode(8, OUTPUT);         //initialize UART with baud rate of 9600 bps  ...

Installing Hyper Ledger Fabric on Windows 10

Image
Steps and links used for Installing Hyper Ledger Fabric on Windows 10 Steps for installation: 1 Open power shell in Admin mode. 2 Enable windows SubSystem for Linux dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 3 Enable Virtual Machine feature dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 4 Set WSL-2 as default version wsl --set-default-version 2 5 Install Ubuntu app from windows store: Open the Microsoft Store and install Ubuntu 20.04 LTS here 6 Install windows terminal It enables multiple tabs, quickly between the Linux command line and the windows command prompt. 7 Download linux kernel update package: To update the WSL package download setup at the below-mentioned link, it needs admin privilege. https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi 8 Open Windows Terminal and add a new ubuntu tab, you won’t be able to see the ubuntu terminal. Under add new terminal section. 9...

Sensor based Counting device - Design and implement basics embedded circuits

Image
  Sensor based Counting device Tinker Cad Simulation Circuit with Operational Code Sensor Based Counting Circuit Components required for above circuit: 1) Arduino Uno 3 2) PIR Sensors (x2) 3) LCD 16 x 2 4) Potentiometer 250 kilo ohm 5) Resistor 220 ohm Coding for above circuit: #include <LiquidCrystal.h> int in = 15; int inpr = 16; int out = 14; int outpr = 17; int ppl = 0; LiquidCrystal lcd(12, 11, 5, 4, 3, 2); bool pi = 0; bool po = 0; void setup() {   pinMode(15, INPUT);   pinMode(14, INPUT);   pinMode(16, OUTPUT);   pinMode(17, OUTPUT);   lcd.begin(16, 2); } void loop() {   lcd.clear();   digitalWrite(outpr, HIGH);   digitalWrite(inpr, HIGH);   pi = digitalRead(in);   po = digitalRead(out);   if (pi == 1){     ppl--;     delay(500);   }   else if (po == 1){     ppl++ ;     delay(500);   }   ppl = constrain(ppl, 0, 50);   lcd.setCursor(0, 0);   lcd.p...