My final project for robotics would be a door that closes and opens just by asking google to do so, but i keep getting the “particle” does not name a type:
Servo door;
void setup()
{
door.attach(D3);
}
particle.variable("door", Servo door);
particle.subscribe("googleHome_open", doorOpen);
void doorOpen(const char *event, const char *data)
{
door.write(80);
}
Please help me fix this issue and possibly make my code even better as this is my first time using a Particle Photon