As for how it works: it works. Well done for your persistence in learning
As for the diagram: not quite enough attention has been paid to the layout. It’s worth ensuring it’s legible, even for yourself. In three years’ time, you’ll struggle to work out what’s what because the lines overlap.
By the way, you can use comments for the blocks. You can move them (the comments) and make your work easier by describing the blocks.
Rafik4 wrote: Please check this and perhaps suggest an idea for the next exercise.
Exercise – very important: extend this system to include the option to opt out of making a decision. So if the drop-down menu appears, you have no choice but to select something else. In the worst-case scenario, it will always be ‘fridge’.
Come up with a way to return to the "roller blind" option – without releasing the button.
And what if you want to cancel the on/off action altogether?
Second version of the extension (in my opinion, this will be a better setup):
- short pulses (under 0.5s) cycle through the options
- a pulse longer than 0.7s activates the option
- a pulse between 0.5 and 0.7s does nothing
"Expert" version
- short pulses (under 0.5s) cycle through the options
- a pulse of 0.7–1.0 s sets the output
- a pulse of 1.4–2.0 s clears the output
"Business" version
similar to the "expert" version but with the following additions
- the selected function requires a "command" to set or clear the output, as well as an additional confirmation pulse lasting no longer than 0.4s and occurring no later than 2.0s after the command is issued.
This is important because we do not want, for example, a child to switch off the washing machine
It is possible to make things quite difficult.
--------------
For ambitious students
- LIFT
ground floor and first floor.
one call button per floor,
one limit switch per floor to indicate the lift’s position,
two buttons in the cabin to request the destination floor
(for enthusiasts, a proposal with a single button in the cabin.)
Basic assumptions:
- when the controller is activated, the lift may be between floors
- we assume that nothing breaks down
- we assume that the buttons are operated by mischievous children, of whom there are three: one on the ground floor, one on the first floor and one in the lift.
- other assumptions as required.
Added after 7 [minutes]:
Rafik4 wrote: I’ve added my colleagues’ suggestions to the programme.
One comment. You’ve used a certain mechanism in Logo that allows messages to be stacked. I’m not saying that’s a bad thing – I use it myself – but I just want to make sure you’re doing it deliberately.
If I were to change the message priorities in your project, or if you were to create those messages in reverse order yourself, the display would show something other than what you would expect.
If I were you, I’d use the signal after the decoder rather than before.
The point is that after the decoder you have clean information, where only one output is active. So only one message will be active – not all of them, just stacked on top of each other.
It works, it’s more about being aware of it.