This file contains 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
Goertzel(float TARGET_FREQUENCY,float BLOCK,float SAMPLING_FREQ){ | |
SAMPLING_RATE=SAMPLING_FREQ; //9KHz for a 16MHz Arduino | |
TARGET=TARGET_FREQUENCY; //must be an integer of SAMPLING_RATE/N | |
N=BLOCK; //Block size | |
int k; | |
float omega; | |
//math | |
k = (int) (N * (TARGET_FREQUENCY / SAMPLING_RATE) + 0.93); | |
omega = (2.0 * PI * k) / N; |
This file contains 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
void inicio(){ | |
while(true){ | |
Goertzel goertzel = Goertzel(4000, N, SAMPLING_FREQUENCY); | |
goertzel.sample(A0); | |
float ligar = goertzel.detect(); | |
if(ligar>900){ | |
digitalWrite(led2, LOW); | |
for (int i = 0; i < 8; i++) | |
{ | |
lc.setRow(0,i,invader1a[i]); |
This file contains 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
version : '3' | |
services: | |
mysql: | |
image: mysql:latest | |
container_name: dev_mysql | |
environment: | |
MYSQL_USER: user | |
MYSQL_PASSWORD: pass | |
MYSQL_ROOT_PASSWORD: pass |
This file contains 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
void loop() | |
{ | |
if(locUpTime - generalTime > 3){ | |
int chk = DHT.read22(DHT11_PIN); | |
dtostrf(DHT.temperature, 4,1,TemperatiraDHT); | |
dtostrf(DHT.humidity, 4,1,Humidade); | |
generalTime=locUpTime; | |
} | |
dtostrf(Termistor(), 4,1,TemperaturraTermistor); | |
dtostrf(bitRead(PORTD,3), 2,0, Ar); |
This file contains 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
--- | |
version: '2' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:5.1.2 | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- "2181:2181" | |
environment: |
This file contains 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
{ | |
"namespace": "com.jaimedantas", | |
"type": "record", | |
"name": "Payment", | |
"fields": [ | |
{"name": "id", "type": "string"}, | |
{"name": "amount", "type": "double"} | |
] | |
} |
This file contains 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
data class Resource( | |
var id: String) |
This file contains 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
data class HelloWorld( | |
var message: String) |
This file contains 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
@ConfigurationProperties("microservice") | |
class PropertiesConfiguration { | |
var processingTime: Long = 0 | |
var threads: Long = 0 | |
var returnMessage: String = "" | |
} |
This file contains 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
@Controller | |
class RestController { | |
@Inject | |
lateinit var loadSimulator: LoadSimulator | |
private val logger: Logger = LoggerFactory.getLogger(javaClass) | |
val validator: Validator<Resource> = ResourceValidator() | |
OlderNewer