This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int adc_max = 0; // Variable to store the maximum sensor value | |
int adc_min = 1023; // Variable to store the minimum sensor value | |
long tiempo_init; // Variable to store the initial time | |
void setup() { | |
Serial.begin(115200); // Initialize the serial communication | |
tiempo_init = millis(); // Get the current time in milliseconds | |
} | |
void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Calibration values obtained from the sketch: volt_ac_cal | |
int adc_max = 760; // Maximum sensor value during calibration | |
int adc_min = 261; // Minimum sensor value during calibration | |
float volt_multi = 231; // RMS voltage obtained from a multimeter | |
float volt_multi_p; // Peak voltage | |
float volt_multi_n; // Negative peak voltage | |
void setup() { | |
Serial.begin(115200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Checking if a binary tree is a complete binary tree in C++ | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int key; | |
struct Node *left, *right; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Checking if a binary tree is a full binary tree in C++ | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int key; | |
struct Node *left, *right; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *left, *right; | |
Node(int data) { | |
this->data = data; | |
left = right = NULL; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<Servo.h> | |
#include<SoftwareSerial.h> | |
SoftwareSerial bt(6,7); | |
Servo myServo; | |
Servo myServo1; | |
void setup() { | |
Serial.begin(9600); | |
bt.begin(9600); | |
myServo.attach(9); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int IN1 = 7; | |
const int IN2 = 6; | |
const int ENA = 9; | |
const int ENB = 3; | |
void setup() { | |
pinMode (IN1, OUTPUT); | |
pinMode (IN2, OUTPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testing for sutdents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
struct node { | |
int data; | |
struct node* left; | |
struct node* right; | |
}; | |
struct node* createNode(int val) { | |
struct node* temp = (struct node*)malloc(sizeof(struct node)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* C++ Program - Linear Search */ | |
#include<iostream> | |
#include<conio.h> | |
void main() | |
{ | |
int arr[10], i, num, n, c=0, pos; | |
cout<<"Enter the array size : "; | |
cin>>n; |
NewerOlder