Go Down

Topic: Help writing code for the flowchart I created. (Read 426 times) previous topic - next topic

Mully911

Hello fellow Enthusiasts!

I created a flowchart for a program I would like to wright for the Uno. I would like to use the toggling digital output from an IR object detector to detect the presence of on object When an object is detected light LED1, if object is still being detected after 5 seconds, light an blink LED2, if the object is still detected after 10 seconds light LED3, turn all LEDs off and return to start.

This is far beyond my programming ability. Any thoughts on how to create this code would be awesome!!

Thanks in advance!
Mike

UKHeliBob

Quote
This is far beyond my programming ability.
So start with something simpler or just part of your project.

Learn to read a digital input
Learn to turn an LED on and off
Learn to use millis() for timing

Examples of each are in the IDE
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

vinceherman

#2
Nov 02, 2018, 08:11 pm Last Edit: Nov 02, 2018, 08:17 pm by vinceherman
Yes, break it down into smaller pieces.

Running a simple tutorial like Blink (referred to above by UKHeliBob) confirms that you can accurately compile a sketch, upload to a board and see direct output.

The you can modify it to make it blink differently.  Blink faster.  Blink slower.  Confirm that you can make a code change and see that change the behavior of the board.

Mully911

Hi Thanks for the replies!

I can do all of the things mentioned above but I have trouble putting these all together to getting the syntax correct to make it work. I always get compile errors and debugging my code is a very difficult task with the tools available I found.

AWOL

@Mully911 will be enjoying a brief forum timeout to allow @Mully911 time to read the forum guidelines on cross-posting.

Go Up