Arrays and bitwise operations
In a nuclear plant there are 50 displays, each of them has 4 LEDs to show if there are some emergencies in progress.
LED 0: Core Overheating
LED 1: Core Low Power
LED 2: Radiation Leak
LED 3: Warning Siren (active if and only if at least one of the previous warnings is ON)
Futrhermore, the building is splitted into two wings:
Wing 1: Displays 0-24
Wing 2: Displays 25-49
Implement a program in which the user can control these displays, one by one.
Requirements:
⦁ Each display shall be represented with an unsigned int variable
⦁ +The displays themselves shall be declared as an array of such unsigned int
⦁ Each LED is represented by a bit in such unsigned int variable. For instance:
Display 0: bit.0 is the Core Overheating LED of the first display. When Core Overheating is ON, display[0] == 9 because both bit.0 (Core Overheating) and bit.3 (Warning Siren) are set
Display 49: bit.3 is the Warning Siren LED of the 50th display. When the Warning Siren is ON, display[49] is > 8 because we need LED3 (bit.3) active + AT LEAST another LED active
⦁ The user shall first specify the display of interest
⦁ The user shall specify which wing such display is part of
⦁ If the user wants to act on a display which is in the other wing, the action must be forbidden (e.g. I want to turn ON an LED on display 2 of wing 2 ==> Error because display 2 is in wing 1)
⦁ The user shall be able to turn ON or to turn OFF an LED of the previously specified display. If the display is already in the desired state, nothing should change
⦁ The user shall be able to retrieve the information about a specified display, which will be printed on screen using this template:
Information of Display 23 - Wing 1
Core Overheating: 1
Core Low Power: 0
Radiation Leak: 0
Warning Siren: 1
⦁ The Warning Siren LED (bit.3) can't be changed directly by the user, it must be turned ON/OFF automatically depending on the current state of the other three LEDs
⦁ The function to change the LEDs status must be implemented outside main()
⦁ Use bitwise operations to set/clear the LEDs. (operators: | & << >> |= &= )
Hi I have a lot of experience with C and bitwise operations and can help you with your problem. I can start working immediately, so if you're interested, I'd love to discuss more about this in chat.
Welcome Sir
I can help you in successfully completing your project. I am an expert in the Arduino field. I have done many similar projects for this work. Send me all the details.
Here are some of my work
I unveiled an integrated Arduino smart control system at Nestle Ice Cream Company
I made a car robot that avoids obstacles
I made a Bluetooth controlled robot and showed me its location on the phone
I made a Wi-Fi-controlled robot
I made an integrated smart control in a mini city
I made a robot that is used for protection and it shows me the temperature and humidity of the place and it also shows me the percentage of gas in the place and can send me the percentage of lighting in the place and the distances around it
-Drones
circuit Design
-fritzing
-proteus
-Tinkercad
-PCB design
-plc
-cad