Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a detailed pseudocode(just english no functions) for the problem in the picture. You must include all variable declarations and programming logic necessary to complete

Write a detailed pseudocode(just english no functions) for the problem in the picture. You must include all variable declarations and

programming logic necessary to complete the task described. Someone should be able to

read through your pseudocode and completely understand the functionality of the sketch.

ARDUINO

THIS IS THE LINK

https://learn.adafruit.com/usb-plus-serial-backpack/testing-with-ttl-serial

This is the code in page 126

//Sending Multiple Variables at Once

//Define LED pins

const int RED =11;

const int GREEN =10;

const int BLUE =9;

//Variables for RGB levels

int rval = 0;

int gval = 0;

int bval = 0;

void setup()

{

Serial.begin(9600); //Serial Port at 9600 baud

//Set pins as outputs

pinMode(RED, OUTPUT);

pinMode(GREEN, OUTPUT);

pinMode(BLUE, OUTPUT);

}

void loop()

{

//Keep working as long as data is in the buffer

while (Serial.available() > 0)

{

rval = Serial.parseInt(); //First valid integer

gval = Serial.parseInt(); //Second valid integer

bval = Serial.parseInt(); //Third valid integer

if (Serial.read() == ' ') //Done transmitting

{

//set LED

analogWrite(RED, rval);

analogWrite(GREEN, gval);

analogWrite(BLUE, bval);

}

}

}

image text in transcribed

4. Set up an RGB LED and an LCD display. Use the display to give the user four color choices numbered 1-4. Once the user enters a number into the Serial monitor, the RGB LED should light up in the respective color and the display should state what color is being shown. After a few seconds, repeat the process. The following webpage: https://learn.adafruit.com/usb-plus-serial-backpack/ testing-with-ttl-serial will help in using the LCD displays. It would also be helpful to refer to Listing 6-5 on page 126 of your textbook to complete this activity. 4. Set up an RGB LED and an LCD display. Use the display to give the user four color choices numbered 1-4. Once the user enters a number into the Serial monitor, the RGB LED should light up in the respective color and the display should state what color is being shown. After a few seconds, repeat the process. The following webpage: https://learn.adafruit.com/usb-plus-serial-backpack/ testing-with-ttl-serial will help in using the LCD displays. It would also be helpful to refer to Listing 6-5 on page 126 of your textbook to complete this activity

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions