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]
2 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]2 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
Convert<br> 0.625 to binary
Anastaziya [24]

\huge{ \rm{Question:}}

Convert

0.625 to binary

\huge{ \rm{Answer:}}

Translate 0.625 into a fraction. We all know that 0.5 is ½. We know that the remainder, 0.125, is ⅛. Add them together, and you get ½ + ⅛ = ⅝.

Now, in binary, the positions to the right of the point are , which is ½, ¼, and ⅛ respectively.

⅝ is 5 × ⅛. 5 in binary is 101. So, ⅝ is

= 0.101

8 0
2 years ago
A leading global vendor of computer software, hardware for computer, mobile and gaming systems, and
V125BC [204]

Answer:

Microsoft

Explanation:

5 0
2 years ago
Nowadays computer games are mostly available on external<br> hard disk.<br> Is it true or false?
sergey [27]

Answer:

false

Explanation:

because a lot of times they are downloads without the disk

7 0
3 years ago
Read 2 more answers
Which function converts the users input to a number without a decimal?
sertanlavr [38]

Answer:

Explanation: integer is the meaning of int() if you payed attention to programming class, int() would be a WHOLE number and not a decimal number, 2nd of all, a decimal number would be float() so the answer is int() hope i helped!

Explanation:

hope this helped byyyyyyyyyyye

6 0
3 years ago
TCPDump is used by Wireshark to capture packets while Wireshark own function is:
galben [10]

Answer:

a. to provide a graphical user interface (GUI) and several capture filters

Explanation:

TcPDump is a command line tool used to capture packets. TcPDump is used to filter packets after a capture has been done. To control network interfaces, TcPDump need to be assigned root privileges. Data is represented in form of text

Wireshark provide a graphical user interface (GUI) and several capture filters. It is a graphical tool used in packet capture analysis. Data is represented in wireshark as text in boxes.

5 0
2 years ago
Other questions:
  • Sean is white hat hacker, who is demonstrating a network level session hijack attacks and as part of it, he has injected malicio
    6·1 answer
  • Knowing the meaning of the acronym WYSIWYG can be most helpful to you when you
    14·1 answer
  • Which area of physics governs wireless communication?
    10·2 answers
  • TLO 06 Active Directory Domain and Trusts tool is used to move servers between site in an AD Infrastructure.a. Trueb. False
    14·1 answer
  • If a memory reference takes 100 nanoseconds, how long does a paged memory reference take?
    6·1 answer
  • Evolution of computers
    13·2 answers
  • We want to transmit 40 packets and the following packets are getting lost, 3,9, 25,28, 35. How many rounds are needed if
    5·1 answer
  • A technician is assigned a task to configure a new server with six hard drives. The senior administrator requested the technicia
    13·1 answer
  • NEED HELP ASAP!!!!!!
    7·2 answers
  • Suppose that a particular algorithm has time complexity T(n) = 3 \times 2^nT(n)=3×2 ​n ​​ and that executing an implementation o
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!