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
He has a new Wi-Fi router that connects wirelessly to a new desktop and two new laptops, in addition to multiple smartphones, ta
arsen [322]

Answer: LAN(Local area network)

Explanation:

Local area network(LAN) is the network that is made to cover small amount for area for providing network and computer services.It can usually span in the areas such as a personal room, single building etc.

  • It connects different peripheral devices like printer, switches, tabs etc with the computing system in small certain areas.
  • According to the question, the individual should use LAN network for linking computer with the printer device.
  • As the person has connected laptops, tablets,smartphones, network of printer etc within a network in single space, he is interacting these devices using local area network.
6 0
2 years ago
What would be a reason for using a workstation rather than a personal computer?
Pavlova-9 [17]
You can easily organize your work space. also you may have more resources. hope this helps
4 0
2 years ago
Can anybody do Algorithm 2 for me (with Python).<br> Answer = 25 points.
Nostrana [21]

Answer:

age=int(input("Enter age"))

if age>=18:

    print("You are Young")

else

   print("You are child")

Explanation:

if you have any query or any problem kindly ask in comment

5 0
3 years ago
A survey of results on mobile phone datasets analysis
xxMikexx [17]
PErfect! 100% Absolutely beautiful. 
6 0
2 years ago
Which of the following is NOT an example of written communication?
Veronika [31]

Answer:A conversation between co-workers

Explanation:

4 0
2 years ago
Other questions:
  • For each MIPS instruction, show the value of the opcode (OP), source register (RS), and target register (RT) fi elds. For the I-
    13·1 answer
  • Which of the following statements is true of ASCII code?
    12·1 answer
  • What can search the Internet and select elements based on important words?
    6·2 answers
  • I have lost the watch (that,which) you gave me​
    12·1 answer
  • Consider the following C program: int fun(int *i) { *i += 5; return 4; } 352 Chapter 7 Expressions and Assignment Statements voi
    11·1 answer
  • A host is on the 192.168.146.0 network that has a subnet mask of 255.255.255.0. The binary value of the host portion is 11010101
    8·1 answer
  • Merging refers to dividing a single cell into multiple cells. *TrueFalse
    14·1 answer
  • 10.
    15·1 answer
  • Does the source MAC address match your PC interface?
    14·1 answer
  • Answer the following question in 3-4 complete sentences. Define the following terms: - registration - press - keyblock.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!