Back to Parent

int solPin = D2;

bool shouldActivate = false;


void handleActivateMotor( const char *event, const char *data)
{
  for( int i = 0; i < 5; i++ )
  {
    digitalWrite(solPin, HIGH);
    delay( 100 ) ;
    digitalWrite(solPin, LOW);
    delay( 100 );
  }
}

void setup()
{
  pinMode(solPin, OUTPUT);
  Particle.subscribe( "blinkLED", handleActivateMotor );
}

void loop()
{


}
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0