Posts

Object: To print the table of first 10 numbers.

} #include <stdio.h> #include <conio.h> int main() int table[10][10]; int ij: for (i=0; i<10; i++) { for (j=0; j<10; j++) table[i][j]=(i+1)*(1+1); } Printf("The table of first 10 numbers as follows :........"); for (i=0; i<10; i++) { for (j=0; j<10; j++) { Printf("%\n", table [i][j]); } return 0; }

Object: To print the following

#include <stdio.h> #include <conio.h> main() { int i,j; for (i=0; i<5; i++) { for (j=0; j<=i; j++) { printf("*"); printf("\n"); } } getch(); }

switch LED on/off using touch switch

 void setup() {  Serial.begin(9600);  delay(1000);  Serial.println("ESP32 Touch Test");  pinMode(onboard_led, OUTPUT); ) void loop() {  Serial.println(touchRead(TO)); // get value using TO if(touchRead(TO)<=20) { digitalWrite(onboard_led,HIGH); Serial.println("LED is activated as Touch is detected"); } else {  digitalWrite(onboard_led,LOW); } delay(1000);                     // check for touch value after every 1 second. }

LED blink

 void setup() {  Serial.begin(9600);  pinMode(LED, OUTPUT);  } void loop() { digitalWrite(LED, HIGH); Serial.println("LED_STATUS--> ON"); delay(1000); digitalWrite(LED, LOW); Serial.println("LED_STATUS--> OFF"); delay(1000); }

Ritik Chaudhary

Image

Ritik Chaudhary

Image