TANK TANK

Showing posts with label Arduino stroboscope. Show all posts
Showing posts with label Arduino stroboscope. Show all posts

Monday, March 19, 2018

No Parts Arduino Stroboscope

In this post I'm coding for Arduino program that can control blink rate of an LED.

I tried to make it very simple.

Here you can see minimum hardware used:

Arduino UNO
Arduino USB cable
White LED
Laptop with Arduino IDE


I chose Arduino UNO from the drop down menu.






Then opened Blink example.

And then I got the code that reads serial monitor to control LED and changed it to control blink rate.


/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.



 */





int led = 8;
int MyDelay = 50 ;
// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT); 
  pinMode(13, OUTPUT); 
  digitalWrite(13, LOW);  
  
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Input 1 to increase delay on and 2 to decrease delay ");
}
  void change_rate() {
  
      if (Serial.available())
  {
    int state = Serial.parseInt();
    if (state == 1)
    {

     if(MyDelay < 1000 ) 
     MyDelay = MyDelay + 10 ; 
      
     Serial.println("Command completed delay increases");
    }
    if (state == 2)
    {
      
      
     if(MyDelay > 0 )  
     MyDelay = MyDelay - 10  ;
     Serial.println("Command completed delay decreases");
    }  
  }
    
    
    
}

// the loop routine runs over and over again forever:
void loop() {
  
  change_rate();
  
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(10);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(MyDelay);               // wait for a second
  
  
  
  
  
}










Paid Online Surveys

Check our books on Amazon we created on our way to find happiness.


A Trip To Siwa Oasis: Tourist guide to an Egyptian Oasis by [ElSakhawy, Sara M.]


A Trip To Siwa Oasis




The Ultimate travel bag list by [ Elskhawy, Sara M.]















Sunday, March 18, 2018

Arduino stroboscope

This is going to be one of my to-do Arduino projects. I wanted to make this Arduino controlled stroboscope.

Stroboscope is a device which generates bright flashes of light for short intervals at selected frequencies.

When set to the right frequency, it produces an optical illusion to the human eye that some moving parts or devices are still.

For example, if you have a car wheel and you need to examine its rotation at high speeds. This can be done by a stroboscope that is set to flashing frequency that is equal to the wheel rotation speed. When the flashing time is equal to the rotation speed of the car wheel it seems that it has stopped.

When the flashing frequency is less that of rotation, then it looks as if it is rotating slowly.

When it’s flashing at a speed higher than that of wheel rotation it seems as if it’s rotating in the opposite direction.

The most important hardware component of the device is the illumination source(in most cases this would be a high brightness LED).

While the most important piece of software code is that part handling ON/OFF times.

Today I thought that I can use the PC as the frequency display and control for Arduino timing.

Communication between PC and Arduino can be done using serial() function.







Paid Online Surveys

Check our books on Amazon we created on our way to find happiness.



A Trip To Siwa Oasis: Tourist guide to an Egyptian Oasis by [ElSakhawy, Sara M.]


A Trip To Siwa Oasis




The Ultimate travel bag list by [ Elskhawy, Sara M.]