Got blue, red and yellow lights that each can turn ON independently of one another. Using operators, structs, etc. how to obtain the current color, if having: Red & Blue is purple, Blue and Yellow is green and Yellow & Red is Orange. This is not a homework.
johans22 0 Newbie Poster
Recommended Answers
Jump to PostHow you code this depends upon how the lights are integrated into the system. If directly connected to I/O ports of the computer, then you would use io-in and io-out instructions to read or set their states (on or off). If other such as serial ports, the problem is a …
All 4 Replies
rproffitt 2,701 https://5calls.org Moderator
johans22 0 Newbie Poster
rproffitt 2,701 https://5calls.org Moderator
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rproffitt commented: Lights += 1; +11
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.