示例#1
0
文件: final.cpp 项目: emilio/gii-3
void setup() {
    Serial.begin(115200);
    Serial.print("DHT11 LIBRARY VERSION: ");
    Serial.println(Dht11::VERSION);

    lcd.begin(LCD_COLS, LCD_ROWS);
}
void setup()
{
  lcd.begin(16, 2);
  pinMode(motor_FW, OUTPUT);
  pinMode(motor_BW, OUTPUT);
  pinMode(buzzer, OUTPUT);
}
示例#3
0
//==============================================================================================
//=============================================SETUP LOOP=======================================
//==============================================================================================
void setup() {
    pinMode(RLED, OUTPUT);
    pinMode(GLED, OUTPUT);
    pinMode(BLED, OUTPUT);
    pinMode(wire1, INPUT);
    pinMode(wire2, INPUT);
    pinMode(wire3, INPUT);
    pinMode(wire4, INPUT);
    pinMode(largeKey, INPUT);
    pinMode(smallKey, INPUT);

    TCCR1A |= (1 << COM1A0);
    TCCR1B |= (1 << WGM12) | (1 << CS12);
    TIMSK1 |= (1 << TOIE1);
    sei();

    lcd.begin(16, 2);
    lcd.clear();
    lcd.print("Bomb prop V1.1");
    lcd.setCursor(0,1);
    lcd.print("J McKenna [MMS]");
    for (int i = 0 ; i <= 3 ; i++) {
        delay(500);
        setLED(0);
        delay(500);
        setLED(1);
    }
    lcd.clear();
}
void setup () {
  Serial.begin (9600);
  initComponents();

  lcd.begin(16, 2);
  lcd.print("Hello, World!");
}
示例#5
0
// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  lcd.begin(16, 2);
  lcd.setCursor(0,0);
 
  lcd.clear();
}
示例#6
0
void setup()
{
    RFID.begin(9600); // start serial to RFID reader
    Serial.begin(9600); // start serial to PC
    lcd.begin(16, 2);
    //lcd output
        lcd.clear();
        lcd.print("There are "); //start printing the result
        lcd.print(space_left); //then how many spaces
        lcd.print("  spaces left."); //words
        lcd.println(" "); //spaces
    
    for (int i = 0; i < 5; i++)
    {
       id_marker[i] = 0;
    }
    
    Serial.println("Ready!");
     
  //sets everything in the array equal to blank
 for(int i=0; i<5; i++)
        {
            id_array[i] = String("");
        }
  
}
void setup()
	{
	lcd.begin(16, 2);
	pinMode(_input_pin, INPUT);
	lcd.setCursor(0, 0);
	lcd.print("T");
	}
示例#8
0
void setup() {
  Serial.begin(9600);
  lcd.begin(16, 2);
  Wire.begin(8); 
  Wire.onReceive(receiveEvent);
  lcd.setCursor(0, 0);
}
示例#9
0
void setup() {
  lcd.begin(16, 2);
  pinMode(switchPin, INPUT);
  lcd.print("Ask the");
  lcd.setCursor(0, 1);
  lcd.print("Crystal ball");
}
示例#10
0
void setup() {
  // set the LCD's number of cols and lines
  lcd.begin(16, 2);
  
  // print a message
  lcd.print('RHTLCD Starting');
  delay(1000);
}
void setup() {
    lcd.begin(16, 2);
    Serial.begin(9600);
    pinMode(10,OUTPUT);
    digitalWrite(10, HIGH);

    randomSeed(analogRead(RNG_SEED_PIN)); // Seed the PRNG with analog noise from A2
}
示例#12
0
void LCD_setup() 
{
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  lcd.noCursor();
  lcd_enabled = 0;
  lcd.noDisplay();
}
void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Lu: To: Te:");
    // initialize the serial communication:
  Serial.begin(9600);
}
示例#14
0
void setup(void){
   lcd.begin(16,2);
   lcd.print("Hola, Mundo");
   Serial.begin(9600);
   pinMode(11,OUTPUT);
    pinMode(12,INPUT_PULLUP);
   pinMode(13, INPUT_PULLUP); 
}
示例#15
0
void setup(){
   lcd.begin(16, 2);               // start the library
   lcd.setCursor(0,0);             // set the LCD cursor   position 
   lcd.print("BustaDuino");  // print a simple message on the LCD
   CreateRandomSeed();
   randomSeed(seed);
   Serial.begin(9600);
}
示例#16
0
void setup()
{
	Log(L"LCD Sample\n");

	lcd.begin(16, 2); // need to specify how many columns and rows are in the LCD unit (it calls clear at the end of begin)

	lcd.setCursor(0, 0);
	lcd.print("Hello Habrahabr!");
}
示例#17
0
void setup(){
  Serial.begin(9600);
  Serial.println("Serial Ready");
  RFID.begin(9600);
  Serial.println("RFID Ready");
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  lcd.begin(16, 2);  
}
void setup() {
   lcd.begin(16,2);
   pinMode(6, INPUT);     
   pinMode(13, OUTPUT);     
   lcd.print("Chiedi alla");
   lcd.setCursor(0,1);
   lcd.print("Palla di Cristallo");
   digitalWrite(13,HIGH);
}
示例#19
0
void setup()
{
lcd.begin(16, 2);
pinMode(Luz_Fundo,OUTPUT);
digitalWrite(Luz_Fundo,HIGH);
lcd.setCursor(0,0);
lcd.print(" Hello World ");

lcd.createChar(1, heart); // envia nosso character p/ o display
}
示例#20
0
int main(void)
{
    clock_setup();

    spi2.begin();

    configure_as_output({PB, 0});
    set_pin({PB, 0}, true);
    etk::sleep_ms(300);

	//configure chip select pin
    auto cs = gpio_pin(PA, 8);
    configure_as_output(cs);
    set_pin(cs, true);

	//start LCD screen
    lcd.begin();


    etk::sleep_ms(500);
    while(true)
    {
        lcd.set_cursor(0, 0);
        lcd.print("Temp: ");

        set_pin(cs, false);

        union spidata
        {
            char bytes[4];
            int32 data;
        };

        spidata data;
        data.bytes[3] = spi2.read();
        data.bytes[2] = spi2.read();
        data.bytes[1] = spi2.read();
        data.bytes[0] = spi2.read();

        set_pin(cs, true);

        lcd.set_cursor(2, 6);

        int32 v = data.data;

        if (v & 0x80000000)
            v = 0xFFFFC000 | ((v >> 18) & 0x00003FFFF);
        else
            v >>= 18;

        real_t deg_c = v;
        deg_c *= 0.25;
        lcd.print(deg_c, " C");
        etk::sleep_ms(500);
    }
示例#21
0
void setup() {
	Serial.begin(9600);
    lcd.begin(16, 2);
    led.on();
	machine.add_transition(0, 1, &button_pressed);
	machine.add_transition(1, 2, &one2two);
	machine.add_transition(2, 0, &button_pressed);
    machine.add_state_function(0, &hello);
    machine.add_state_function(1, &off);
    machine.add_state_function(2, &counting);
}
示例#22
0
void setup()
{
  Serial.begin(19200);
  g_lcd.begin(16, 2);
  pinMode(g_ledpin, OUTPUT);
  setup433();
  noInterrupts();           // disable all interrupts
  TIMSK0 |= (1 << OCIE0A);  // enable timer compare interrupt
  interrupts();             // enable all interrupts

}
示例#23
0
文件: main.cpp 项目: iddqd2/stopwatch
void setup()
{
  lcd.begin(16, 2);                // initialise the LCD.
  pinMode(ledPin, OUTPUT);         // sets the digital pin as output
  pinMode(buttonPin, INPUT);       // not really necessary, pins default to INPUT anyway
  digitalWrite(buttonPin, HIGH);   // turn on pullup resistors. Wire button so that press shorts pin to ground.
  digitalWrite(stopButtonPin, HIGH);   // turn on pullup resistors. Wire button so that press shorts pin to ground.
  lcd.setCursor(0,0);
  lcd.print("System Ready...");
  lcd.setCursor(0,1);
}
示例#24
0
void setup(){
  
  lcd.begin(16,2); // sets the rows and columns of the LCD
  
  
  Serial.begin(9600);
  for(int pinNumber = 2; pinNumber < 5; pinNumber++)
  {
    pinMode(pinNumber, OUTPUT);
    digitalWrite(pinNumber, LOW);
  }
}
示例#25
0
void setup() {
  // set up the LCD's number of rows and columns: 
  Serial.begin(57100);
  lcd.begin(16, 2);
  pinMode(onOffPin, OUTPUT);
  // Print a message to the LCD.
  //lcd.autoscroll();
  lcd.print("Don't Steal!");
  digitalWrite(onOffPin, HIGH);
  isOn = 1;
  memset(currMsg,0,16);
}
示例#26
0
void setup()
{
    delay(1000);

    Serial.begin( 9600 );           // Debugging only
    vw_set_rx_pin( RECEIVE_PIN );
    vw_set_ptt_inverted( true );  	// Required for DR3100
    vw_setup( 2000 );	 			// Bits per sec
    vw_rx_start();       			// Start the receiver PLL running
    lcd.begin( 16, 2 );
    delay( 2000 );
}
示例#27
0
文件: rover.cpp 项目: Tnek/falconia-2
void setup()
{
    Serial.begin(9600);
    lcd.begin(16, 2);
    detect_serial();
    movement_init();
    sensors_init();
    if (COUNTDOWN_ENABLED) {
        calibrate_countdown();
    }

    path();
} 
示例#28
0
void setup() {
	// Set baud rate of 115200
	Serial.begin(115200);
	// Set 'red' LED as output
	pinMode(red, OUTPUT);
	// Set debug LED as output
	pinMode(13, OUTPUT);

	digitalWrite(red, LOW);

	// Write 'block:' to first line
	lcd.begin(16, 2);
	lcd.print("Block: ");
}
void timer() {
  lcd.begin(16, 2);
  lcd.print("  Shower Timer ");

  delay(150);

  for(int i=seconds; i>=0; i--){
    lcd.setCursor(4, 2);
    lcd.print("00:00:0");
    lcd.print(i);
    delay(1000);
  }
  trigger();
}
示例#30
0
void setup()
{
  SIM900.begin(9600);
  Serial.begin(9600);
  lcd.begin(16, 2);
  pinMode(8, INPUT);
  pinMode(9, INPUT);
  pinMode(10, OUTPUT);
  lcd.setCursor(3,0);
  lcd.print("CAR THEFT");
  lcd.setCursor(1,1);
  lcd.print("DETECTION SYS");
  delay(2000);
  lcd.clear();
}