| 전자부품 데이터시트 검색엔진 |
|
DEV-13956 데이터시트(PDF) 20 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-13956 데이터시트(HTML) 20 Page - SparkFun Electronics |
|
20 / 26 page ![]() dspeed sensor pinMode(RAIN, INPUT_PULLUP); // input from wind meters rain gauge sensor pinMode(REFERENCE_3V3, INPUT); pinMode(LIGHT, INPUT); //Configure the pressure sensor myPressure.begin(); // Get sensor online myPressure.setModeBarometer(); // Measure pressure in Pascal s from 20 to 110 kPa myPressure.setOversampleRate(7); // Set Oversample to the re commended 128 myPressure.enableEventFlags(); // Enable all three pressure and temp event flags //Configure the humidity sensor myHumidity.begin(); seconds =0; lastSecond = millis(); // attach external interrupt pins to IRQ functions attachInterrupt(0, rainIRQ, FALLING); attachInterrupt(1, wspeedIRQ, FALLING); // turn on interrupts interrupts(); Serial.println("Weather Shield online!"); } void loop() { //Keep track of which minute it is if(millis() lastSecond >= 1000) { digitalWrite(STAT1, HIGH); //Blink stat LED lastSecond += 1000; //Take a speed and direction reading every second for 2 mi nute average if(++seconds_2m > 119) seconds_2m =0; //Calc the wind speed and direction every second for 120 s econd to get 2 minute average float currentSpeed = get_wind_speed(); //float currentSpeed = random(5); //For testing int currentDirection = get_wind_direction(); windspdavg[seconds_2m] = (int)currentSpeed; winddiravg[seconds_2m] = currentDirection; //if(seconds_2m % 10 == 0) displayArrays(); //For testing //Check to see if this is a gust for the minute if(currentSpeed > windgust_10m[minutes_10m]) { windgust_10m[minutes_10m] = currentSpeed; windgustdirection_10m[minutes_10m] = currentDirection; } //Check to see if this is a gust for the day if(currentSpeed > windgustmph) { Page 20 of 26 |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |