-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_arduino.cpp
58 lines (38 loc) · 925 Bytes
/
test_arduino.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//Código exemplo para o Arduino
//Criado em 02-10-2024
//Revisão 1_02_10_2024
#include <iostream>
using namespace std;
int check_string(string str) {
if str.size()%3==0 and str.size()%96==0{
return 1;
}
eles{
return 0;
}
}
char[] convert_char_array(string str){
if check_string(str)==1{
char arr[str.length() + 1];
return strcpy(arr, str.c_str());
}else{
return char arr[0] = '\0';
}
}
void execute_operations(string str){
char arr[str.length() + 1];
if strcpy(arr,convert_char_array(str))!='\0'{
}else{
cout<<"Erro"<<endl;
}
}
//portas
void porta_not(char a){}
void porta_and(char a,char b){}
void porta_or(char a,char b){}
void porta_xor(char a,char b){}
void porta_nand(char a,char b){}
void porta_nor(char a,char b){}
void porta_xnor(char a,char b){}
//1 lógico
//0 lógico