Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a code for a color sensoring machine. Is there anyway you can make a flow chart out of it? Or even a spider

This is a code for a color sensoring machine. Is there anyway you can make a flow chart out of it? Or even a spider flow chart would be appreciated. Thank you so much image text in transcribed
image text in transcribed
\#include sServo ho Hdefine S02 \#define S13 tidefine S24 \#define 535 Ildefine sensor Out 6 Servo topservo: Servo bottomservo: int frequency =0; int colorio. void setupor pinMlode(So, OUTPUT): pinModo(S1, OUTPUT) pinMode(32, OUTPUT): pinMode(S3, output). pinMode(sensciOnd, INPUT) if Selting lrequency-scaling 1020% diptalWrite[SO, HeGHe]: digtafWrito(S1, LOW topservo attach(7); botlomserro altach(s): Serial begin(9600y ) vold loop0 it topServo, write(t80): delany 500 ) forlint i=130;>65;) topservo write(i): delay(2) 1 delay(500) color = reasdColoen: delay 10 ) whilch (color) f case 1: bottomservo wethe(50): break: case 2 bottomserva withe(75) breck. case 3 : bottomservowrite(100) breaks case 4 bottomServo writie (125)] bronk: cases 5 botlomservo wriber 150 ) break: case 6 bottomservo writie 175 : tresk: case 0 break: 1 topservo writecto: detaym: ) delay(200): for(int i=20 i i 115 i i*n) topservo wrbetio: delay(2): 1 celor=0: 1 if Custom Function - readColor? int readColori) ( if Selfing red fillored phichociodes to tee mas digitalWhite(32, LOW digitalinters3, Lown. If Reading the output frequency frequency = pulselin(sensorOut, Lown: in R= trequency. is Prinfing the value on he serial monlar Serial.print( R= "), plprinting name Serial print(freguency) Joprieting RED color thequency Serial printl" "7. delay(50). If Selting Geen thered photodiodes in be mad digtaWinte(S2, HIGH) dightainhte(S3, HiCHX If Reading the eutput frequency frequency i putselntsensorout Lown. int G in frequencri if Printing the value on the serial monder Berial printe" it: delay(So): of Seting Blie fisered pholodiodes bo be read digtahile[s2, LOW). digtahinte[S3. Hachan. is Reading the output frequency frequency = pulseln(sensorDuc. Lown. ieft 8 is frequency. ir Priting the value on the serial monler Serial print("Bn ") Mpricting name Serid print(freguency)dprinting RED collor theguency Seridel printler" "X) deday(50): R123 \& G1441 color a 1: Red 1 foltor =2, W Orange 1 color =3; in Green 1 AR=4;2 Vellow ) color +5 ; 10 Brown 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

Students also viewed these Databases questions

Question

Distinguish between formal and informal reports.

Answered: 1 week ago