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
onst int buttonPin1 = 2; | |
const int buttonPin2 = 3; | |
int valor=0; | |
void setup() { | |
pinMode(buttonPin1, INPUT); | |
pinMode(buttonPin2, INPUT); | |
Serial.begin(9600); |
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
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(2, 3); //RX, TX | |
//Ligando o Shield GSM SIM900. | |
int powerkey = 5; | |
int statuspin = 6; | |
int pinState = 0; |
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
#include <LiquidCrystal.h> | |
#define DELAY_STR (500) | |
#define DELAY_BLOCK (300) | |
#define DELAY_CHAR (20) | |
#define DELAY_RESTART (500) | |
LiquidCrystal lcd1(7, 6, 12, 11, 10, 9); | |
// 0 1 2 3 | |
// 012345678901234567890123456789012345 |
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
double RTgoertzelFilter(int sample, double freq) { | |
static double s_prev = 0.0; | |
static double s_prev2 = 0.0; | |
static double totalpower = 0.0; | |
static int N = 0; | |
double coeff,normalizedfreq,power,s; | |
normalizedfreq = freq / SAMPLEFREQUENCY; | |
coeff = 2*cos(2*M_PI*normalizedfreq); | |
s = sample + coeff * s_prev - s_prev2; | |
s_prev2 = s_prev; |
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
double readInternalTemp() { | |
ADMUX = _BV(REFS1) | _BV(REFS0) | _BV(MUX3); | |
delay(2); | |
double result; | |
byte mean = 0; | |
for(;mean < MEAN_TEMP_INTERNAL; mean++){ | |
ADCSRA |= _BV(ADSC); | |
while (bit_is_set(ADCSRA, ADSC)); | |
result += ((ADCH << 8) | ADCL); |
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
/subsystem=datasources/jdbc-driver=mysql:add\ | |
(\ | |
driver-name=mysql, \ | |
driver-module-name=com.mysql, \ | |
driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource, \ | |
driver-class-name=com.mysql.jdbc.Driver \ | |
) |
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
<dependency> | |
<groupId>org.springframework</groupId> | |
<artifactId>spring-webmvc</artifactId> | |
<version>3.2.4</version> | |
</dependency> | |
<dependency> | |
<groupId>javax.servlet</groupId> | |
<artifactId>javax.servlet-api</artifactId> | |
<version>3.0.1</version> |
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
package hello.config; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
@ComponentScan(basePackages = "hello.config") | |
public class AppConfig { | |
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
#!/bin/bash | |
# Change the current directory to the document path. | |
cd "${BB_DOC_PATH%/*}" | |
# Update PATH. | |
PATH=$PATH:/usr/bin/:/usr/local/bin/ | |
PATH=$PATH:/usr/local/bin:/usr/X11/bin:/usr/texbin:/opt/local/bin | |
# Pre-compute the file names used. |
OlderNewer