Logic Simulator

Prompt: Create a single p5.js sketch using a 400x400 canvas.
The sketch is a simulation of two simple logic gates, one "AND" and one "OR".
There are two input wires on the left.
Label the inputs "A" and "B" using size 16 black text.
Draw input A as a horizontal line at y=50.
Draw input B as a horizontal line at y=150.
Have both input wires connect to both the "AND" and "OR" logic gates.
The top gate is a Boolean "AND" operation.
The bottom gate is a Boolean an "OR" operation.
Add two input toggle buttons on the left side to control the state of the inputs.
Initialize the initial states of the inputs to be off.
When a wire is high, draw it in red.
When a wire is at ground, draw it in black.
Place a label "AND" in size 16 point text on the "AND" gate.
Place a label "OR" in size 16 point text over the "AND" gate.