Monday, December 3, 2018

4-H Scratch Program developed with Google

These block language exercises are great for teaching nearly anyone the foundations of programming algorithms. 

Click here:

Animate a Name:   g.co/csfirst/nysdname

or here

https://csfirst.withgoogle.com/c/cs-first/en/animate-a-name/animate-a-name/animate-a-name.html



Sunday, December 2, 2018

Thinkabit Curriculum Exercises

We'll enjoy having you work through our curricula before we take the next steps for sharing them widely.

  1. This is the outline for our Robocrafting Lab traffic light and servo motor exercises most of you have done previously - https://goo.gl/n5wh9m 
  2. Here is a page where we're developing a few dozen diffeent exercises, listed progressively: https://goo.gl/wD21CL  


Badge-Ver3-arduino-photo_only.jpg

Monday, November 12, 2018

Serial input - Unlock the door for person b

/*Using the small servo in pin 6, power in VIN, and black wire in GND
* wire for red LED in pin 13, wire for green LED in pin 7
*/

// Wei's demo of if-else-if statement, plus a Servo door lock!
#include<Servo.h>
Servo DoorLock;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(13,OUTPUT); //The led is in PIN 13
DoorLock.attach(6);
Serial.println("WELCOME !");
}

char who=0;

void loop() {
  // put your main code here, to run repeatedly:
Serial.println("who are you?");
if(Serial.available()>0){
who=Serial.read();
}
if(who=='a') {
digitalWrite(13,HIGH);

digitalWrite(7,LOW);
delay(500);
Serial.println("person a wants to enter the building");
}

else if(who=='b') {
digitalWrite(7,HIGH);

digitalWrite(13,LOW);

Serial.println("person b is allowed to enter the building");
DoorLock.write(90)
delay(2500);
DoorLock.write(0);
}

}

Serial input and monitoring - Who's at the door?

// Wei's demo of if-else-if statement.

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(13,OUTPUT); //The led is in PIN 13
Serial.println("who are you?");
}

char who=0;

void loop() {
  // put your main code here, to run repeatedly:
if(Serial.available()>0){
who=Serial.read();
}
if(who=='a') {
digitalWrite(13,HIGH);
delay(500);
digitalWrite(13,LOW);
delay(500);
Serial.println("person a wants to enter the building");
}

else if(who=='b') {
digitalWrite(13,HIGH);
delay(250);
digitalWrite(13,LOW);
delay(250);
Serial.println("person b wants to enter the building");
}

}

Thursday, November 8, 2018

Serial monitoring for Arduino sketches

Open Arduino, then use FILE, NEW.

Select and replace that template with the following.  Colors will appear automatically.

=====================================


#include<Servo.h>
Servo HokieServo;    // My first servo is named HokieServo

void setup() {
  // put your setup code here, to run once:
HokieServo.attach(6);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
HokieServo.write(45);
Serial.println("\t  Speed is 45 - left, medium speed");
delay(1000);
HokieServo.write(135);
Serial.println("\t  Speed is 135 - right, medium speed");
delay(1000);
}

Saturday, November 3, 2018

New WiFi, New Sensors


from www.Wired.Com

EMILY DREYFUSS
BUSINESS
10.30.1812:01 AM

IBM’S CALL FOR CODE PRIZE GOES TO A TEAM WITH ‘CLUSTERDUCKS’



Buoys equipped with a low-frequency Wi-Fi network could provide a lifeline to people in areas struck by natural disasters.
PROJECT OWL/IBM

YOU KNOW WHEN you try to go online at a Starbucks or on an airplane, first you get a little popup that asks you to accept some terms before you can get to the internet? That popup window exists in a sort of netherworld between actual internet connection and being offline–you pick it up via Wi-Fi, but until you click a box, you’re not actually online. A team of five developers realized in that gray area was potentially a huge opportunity to save lives.
It’s an intractable problem during natural disasters: telecommunications networks and power grids are often damaged or overwhelmed; without them, first responders struggle to help survivors, coordinate evacuations, and even count the dead. Project Owl proposes an elegant solution: an AI-powered disaster coordination platform paired with a robust communication network that can

Monday, October 29, 2018

Week 3 Slides

El Nino Winter Forecast



More at the WUSA9 blog.

Ultrasonic Sensor code

Ultrasonic Motion Sensor code -
https://goo.gl/PCL9Qo


/*Ultrasonic sensor Pins:
       VCC: +5VDC
       Trig : Trigger (INPUT) - Pin11
       Echo: Echo (OUTPUT) - Pin 13
       GND: GND
*/




WE'LL TRY THIS FIRST

#define trigPin 13 #define echoPin 12 #define led 7 void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(led, OUTPUT); } void loop() { long duration, distance; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; if (distance < 10) { digitalWrite(led,HIGH); } else { digitalWrite(led,LOW); }
Serial.print(distance); Serial.println(" cm"); delay(500); }

=================================
ALTERNATIVE

//  Copy the following and paste into your Arduino software and delete the template provided (the void setup and void loop).
int trigPin = 11;    //Trig - white Jumper
int echoPin = 13;    //Echo - yellow Jumper
long duration, cm, inches;
void setup() {
 //Serial Port begin
 Serial.begin (9600);

Climate change and vinyards


www.washingtonpost.com

washingtonpost.com

Italy’s wine industry is being tested by the effects of climate change in its vineyards




Livio Salvador walks through his vineyard with his son, Enrico, who says that even if humans don’t fully feel the effects of climate change in the region, “the plants do.” (Chico Harlan/The Washington Post)

 Season after season, he’d been growing and harvesting the same grapes on the same land. But five years ago, Livio Salvador began to wonder whether something was changing.
When he walked through his vineyards, he would see patches of grapes that were browned and desiccated. The damage tended to appear on the

Thursday, October 25, 2018

Monday, October 22, 2018

Motion Sensor code (for next Monday)

PIR Motion Sensor code  - www.goo.gl/YJnGVq
(copy everything below the line and paste into your Arduino template)


Schematic and directions: https://www.mpja.com/download/31227sc.pdf
____________________________________________________________


//    Arduino with PIR motion sensor
int led = 13;                // the pin that the LED is attached to
int sensor = 8;              // the pin that the sensor is attached to
int state = LOW;             // by default, no motion detected
int val = 0;                 // variable to store the sensor status (value)


void setup() {
 pinMode(led, OUTPUT);      // initialize LED as an output
 pinMode(sensor, INPUT);    // initialize sensor as an input
 Serial.begin(9600);        // initialize serial
}


void loop(){
 val = digitalRead(sensor);   // read sensor value
 if (val == HIGH) {           // check if the sensor is HIGH
   digitalWrite(led, HIGH);   // turn LED ON
   delay(100);                // delay 100 milliseconds
   
   if (state == LOW) {
     Serial.println("Motion detected!");
     //Would like to insert code to indicate the date and time of this reading
     state = HIGH;       // update variable state to HIGH
   }
 }
 else {
     digitalWrite(led, LOW); // turn LED OFF
     delay(200);             // delay 200 milliseconds
     
     if (state == HIGH){
       Serial.println("Motion stopped!");
       state = LOW;       // update variable state to LOW
   }
 }

}


A message from our WUSA9 Meteorologist Melissa Nord

Week 2 Slides

Saturday, October 20, 2018

Davis Vantage Pro 2 Weather Station Details

Here are the components of the Davis Vantage Pro 2 station we'll be working with:

Davis Vantage Pro 2:
www.amazon.com/gp/product/B001AMRCDU

Davis Instruments 6152 Vantage Pro2 Wireless Weather Station with Standard Radiation Shield and LCD Display Console

November 3 Maker Festival


Welcome!

The 4th Annual Virginia Tech Maker Festival will take place on Saturday, November 3rd, 2018 from 10AM - 3PM at the Virginia Tech Northern Virginia Center (7054 Haycock Road, Falls Church, VA 22043). Stay tuned for further information.

Prepare for a full day of creativity, engineering, and discovery! If you are interested in volunteering for this event, please e-mail Carolyn Darville at carolyn5@vt.edu.

All volunteers will receive a Certificate for their efforts as well as a free lunch. We look forward to seeing you at this free, scientific, community event.



Contact
Carolyn Darville
carolyn5@vt.edu

Monday, October 15, 2018

Loss of Insects?


www.washingtonpost.com

washingtonpost.com

‘Hyperalarming’ study shows massive insect loss



The emerald anole, one of the main insect eaters in the Luquillo forest of Puerto Rico. (Brad Lister/PNAS)
Insects around the world are in a crisis, according to a small but growing number of long-term studies showing dramatic declines in invertebrate populations. A new report suggests that the problem is more widespread than scientists realized. Huge numbers of bugs have been lost in a pristine national forest in Puerto Rico, the study found, and the forest’s insect-eating animals have gone missing, too.
In 2014, an international team of biologists estimated that, in the past 35 years, the abundance of invertebrates such as beetles and bees had decreased by 45 percent. In places where long-term insect data are

Slides from Meeting One