How I can Hide "Mute" message

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
YSRAHMED
Posts: 4
Joined: Mon Feb 26, 2018 8:46 am
Contact:

How I can Hide "Mute" message

Post by YSRAHMED »

8) good day from Egypte

-I am a new User for ٍ{ The Strong Flowcode } ----> I do an alarm for 3 normal open points (3 switches ) interfacing pic 16 f877a
-The operation depend on when every normal open points are closed ---> give Buzzer sound and display the name of points so I do "Mute" for silent and display it -----the problem is How I can Hide "Mute" message when second switch is pressed also when the third is pressed

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: How I can Hide "Mute" message

Post by mnf »

Hi,
Welcome to the forum. Please post your code, or some code that demonstrates what you're trying to achieve and someone will probably be able to help.

Martin

YSRAHMED
Posts: 4
Joined: Mon Feb 26, 2018 8:46 am
Contact:

Re: How I can Hide "Mute" message

Post by YSRAHMED »

mnf wrote:Hi,
Welcome to the forum. Please post your code, or some code that demonstrates what you're trying to achieve and someone will probably be able to help.

Martin
Good day Martin
How I can Attaching my projects FC File on Page ?

Actually --- > this is my First attempt to make simple project using Flowcode .

Project idea :
- 3 switches(Active Low ) control 3 leds on Output of pic16f877a and display the status on LCD
- when pressed any switch -->{ its led is on && "MUTE" Appears on the LCD BY B0 interruption for stop buzzer sound }

- :roll: I need for understand How I Can :

1- add Buzzer Joinet pin B7 ( Intermittent sound) when any switch is closed its contacts.
2- Hiding ASCII "MUTE" when second switch is ON and Buzzer is ON .
- so if I pressed Mute push Button for mute sound agine , the third switch is Hiding ASCII "MUTE" and Buzzer is ON when I pressed it.
3 - Mute the Buzzer sound When 3 switches are ON and display "MUTE" .

thanks alot

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: How I can Hide "Mute" message

Post by Steve001 »

YSRAHMED

How I can Attaching my projects FC File on Page ?
Actually --- > this is my First attempt to make simple project using Flowcode .
Hi Ysrahmed

to add files to the forum post click the "Attachments" tab
then Click the "Add files Button"
a box opens then you select your file

Please be aware certain file types are not allowed, also be aware of file size as people look on mobile devices

Steve
Attachments
Capture1.JPG
Capture1.JPG (30.27 KiB) Viewed 6819 times
Capture.JPG
Capture.JPG (31.15 KiB) Viewed 6819 times
Success always occurs in private and failure in full view.

YSRAHMED
Posts: 4
Joined: Mon Feb 26, 2018 8:46 am
Contact:

Re: How I can Hide "Mute" message

Post by YSRAHMED »

How I can Attaching my projects FC File on Page ?
Actually --- > this is my First attempt to make simple project using Flowcode .
[/quote]

Hi Ysrahmed

to add files to the forum post click the "Attachments" tab
then Click the "Add files Button"
a box opens then you select your file

Please be aware certain file types are not allowed, also be aware of file size as people look on mobile devices

Steve[/quote]


Thanks a lot Steve
3NO-sensoers.fcf
(35.88 KiB) Downloaded 289 times
[quote="Steve001"][quote]YSRAHMED

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: How I can Hide "Mute" message

Post by mnf »

Hi,

You are currently setting the display to show 'Mute' in the interrupt handler.
This is probably a bad idea (writing to the display during an interrupt - what happens if an interrupt occurs whilst the main loop is writing to the display?) - a better bet would be to have a flag. For example: a global variable byte state where state = 0 (alarm off - everything normal), state = 1 (alarm sounding) and state = 2 (Alarm muted) etc
It would be good practice to define these values as constants too.

Then in the interrupt handler (int) just set state = 2 (or, better, state = MUTED)

In the main loop have an extra variable (say current_state) and then if current_state != state, set current_state = state and change the LCD output.

Note that maintaining the current display state and the new state allows the display to only be rewritten if the value has changed.

Hope this helps a bit - I can demonstrate in more detail if needed (when not using my phone to add the message)

Martin

Post Reply