1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ira [324]
3 years ago
14

Write modified code that will generate a random number between 0 and 255 when a button is pressed and will write the number to t

he serial monitor as well as to the receiver Arduino.
Computers and Technology
1 answer:
kobusy [5.1K]3 years ago
8 0

Solution :

#include<LiquidCrystal.h>

int value;

int flag;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()

{

lcd.begin(16, 2);

Serial.begin(9600);

}

void loop()

{

value=digitalRead(7);

  if(value==0){

flag=1;}

  if(value==1){

flag=~flag;}

  if (flag==1){

lcd.setCursor(0,0);    

  lcd.print("number is");

lcd.setCursor(2,1);    

lcd.print(random(0, 255));

delay(1000);

}

  else{

lcd.setCursor(0,0);

lcd.print("Not Pressed");

delay(1000);

lcd.clear();}

}

You might be interested in
6 The part of the computer that contains the brain or central processing unit is also known as the ?
Olin [163]
Answer:  "CPU" .
________________________________
4 0
3 years ago
Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category_name, product
Sphinxa [80]

Answer & Explanation:

1) Query:

SELECT Product_Name, Category_Name, List_Price

FROM Products AS P JOIN Categories AS C

ON C.Category_ID = P.Category_ID

ORDER BY Category_Name, Product_Name ASC;

2) Query:

SELECT C.Last_Name, C.First_Name, Order_Date, P.Product_Name, Item_Price, Discount_Amount, Quantity

FROM Customers AS C JOIN Orders AS O

ON C.Customer_ID = O.Customer_ID

JOIN Order_Items AS OI

ON O.Order_ID = OI.Order_ID

JOIN Products AS P

ON OI.Product_ID = P.Product_ID

ORDER BY Last_Name, Order_Date, Product_Name;

3) Query:

SELECT Category_Name, Product_ID

FROM Categories LEFT JOIN Products

ON Categories.Category_ID = Products.Category_ID

WHERE Product_ID IS NULL;

4) Query:

SELECT 'SHIPPED' AS Ship_Status, Order_Id, Order_Date

FROM Orders

WHERE Ship_Date IS NOT NULL

UNION

SELECT 'NOT SHIPPED' AS Ship_Status, Order_ID, Order_Date

FROM Orders

WHERE Ship_Date IS NULL

ORDER BY Order_Date;

3 0
3 years ago
A security administrator wants to empty the DNS cache after a suspected attack that may have corrupted the DNS server. The serve
MAVERICK [17]

Answer:

The easiest method to clear a DNS cache is to use either the command line, PowerShell or Windows Server's DNS Manager

Explanation:

You can use either the ipconfig /flushdns (command line), Clear-DnsClientCache (PowerShell) or DNS->(name)->Clear Cache (from the DNS Manager)

source:

https://activedirectorypro.com/clear-windows-dns-cache/

https://www.technipages.com/flush-and-reset-the-dns-resolver-cache-using-ipconfig

8 0
3 years ago
Read 2 more answers
Consider the following language:
VMariaS [17]

L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

<h3>How do you know if a language is decidable?</h3>

A language is said to be decidable only when there seems to exists a Turing machine that is said to accepts it,

Here, it tends to halts on all inputs, and then it answers "Yes" on words that is seen in the language and says "No" on words that are not found in the language. The same scenario applies to recognizable language.

So,  L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

Learn more about programming language from

brainly.com/question/16936315

#SPJ1

8 0
1 year ago
Gettier contributed to what we know about the __________ model, while Rosch contributed to what we know about the __________ mod
svet-max [94.6K]

Gettier contributed to what we know about the exemplar model, while Rosch contributed to what we know about the prototype model. Prototype and exemplar theories are both versions of statistical theories of concepts. Prototype theories hold that concepts represent categories by means of a summary of the typical properties that category members possess, while exemplar theories hold that concepts represent categories by means of a cluster of individual category members that may be used to extract the statistical central tendency of the category.

6 0
3 years ago
Read 2 more answers
Other questions:
  • All of the following are qualities of an aprenticeship except
    12·1 answer
  • What does the headgear of a mine do
    6·2 answers
  • The parallax perspective says that objects that are close up appear to move __________ than far away objects.
    10·1 answer
  • OSHA standards appear in the ___________ and are then broken down into ____________.
    9·1 answer
  • Another personal question- are there any messaging sites that MIGHT work if most things are blocked via the school? I doubt anyt
    11·2 answers
  • Write a full class definition for a class named Counter, and containing the following members:________
    9·1 answer
  • Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offsetAmount. Each parameter is of type int. The fu
    10·1 answer
  • Write a recursive function sumAll that accepts an integer argument and returns the sum of all the integers from 1 up to the numb
    10·1 answer
  • Cine stie repede va rog mult si repede
    9·1 answer
  • Which types of scenarios would the NETWORKDAYS function help calculate? Check all that apply.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!