Skip to content

robotitect/Rob-Fan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rob|Fan

Rob|Fan* is a fan that follows a subject around a room, always pointing its breeze straight at them: a robotic fan.

Technical Details

whiteboard explanation

An array of sensors lies along one wall. Each of their positions with respect to the fan is known beforehand and stored in the array yDist[NUM_SENSORS] in ./sketch/sketch.ino/sketch.ino.ino (I deeply apologize for this naming convention). loop() checks each sensor in turn to see if a valid distance is being returned, which means that someone is standing in front of the sensor. We reference the specific sensor's position from the fan in order to come up with a y-coordinate, and we use the distance received from the sensor as the x-coordinate. Then we use math:

// SUCCINCT
int angleRotate(int x, int y)
{
  return (int) atan((double) x / y);
}

This gives the angle from the /wall intersecting Fan & parallel to sensor lines/ to rotate the servo towards.

Major Components

While some of these aren't the exact ones I used they should be close enough.

And these were some possible extensions:

*(Name stolen from inspired by Rob|Arch)

About

A fan that points at you no matter where you go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages