I can change the value of led2 from my arduino circuit and firebase takes it but i dont know how i can take the value with the block diagrams to Label 3.
Your FireBase.GotValue event needs an extra if/then test block to see if the tag is "led" versus "led2", to let it know which label(s) to update from the incoming value.
Thanks, i fixed the problem but i started a new proteject. I wrote the conditions in a paper given below and mit app invertor. I can get the button values and turn the leds on but the conditions are not worked. How can i fix multiple conditions?
But they dont work when conditions change, it can not use the values coming. Also, can it perceive which bits belong to which tag? I tried to make it with "logic and blocks" but i am not sure.
But it didnt work. I want to compare values of texts (kapi_acik and kapi_kapali).
If kapi_kapali = 0 and kapi_acik = 0, print ARADA
If kapi_kapali = 0 and kapi_acik = 1, print KAPI AÇIK
If kapi_kapali = 1 and kapi_acik = 0, print KAPI KAPALI
If kapi_kapali = 1 and kapi_acik = 1, print ARIZA!
So i need to get values of text and compare them, but for if else, i can compare for only KAPI AÇIK and KAPI KAPALI like that:
It didnt work for me. I need to compare values of kapi_acik and kapi_kapali in same if section. I specified conditions before your answer, could you look at 8/9 line?
You did not show how you filled in the empty parts in my sample.
Please be aware that the DataChanged event does not always receive notification of data changed from an Arduino. The AI2-Firebase connection needs to be 'woken up' by a prior communication with Firebase. (@TimAI2 is more expert at this than me, and I do not have a good reference for this in my Firebase FAQ.) To confirm that you actually received any sort of Data Changed event, you might pop up a Notifier or increment a Label.Text value. That would help to distinguish between No DataChanged Event Received and DataChanged Misinterpreted.
Lastly, in your code you are not thinking through the effects of having passed an if/then test on a piece of data. If you pass the if test, you will execute the code in the THEN socket. You tested a tag to see if it contains a particular piece of text. If that test succeeded, how is it possible for that tag to also be a different value within that piece of code? A tag or variable can't have two values at the same time, right?
In the interest of being able to test your logic independently of a Firebase connection, I suggest adding a section to your display with these 3 components:
a Textbox txbTag showing the tag
a Textbox txbValue showing the associated value
a Button btnEnter with a Click event to apply your logic to the .Text contents of the two Textboxes
This will let you test your logic without having to worry about listening to Firebase.
Is there any function for getting value of the text? For example, i want to test of value of X,
If "valueofX" = 1 do ... . Because if i compare values of texts logically like
If valueOf"kapi_acik" && valueOf"kapi_kapali" == 1 do print "ARIZALI!" i will get exactly what i want.
I dont know but, I want to get the value which text in firebase. For example, if "kapiyi_ac" is 1 on firebase, i want to get 1 with using text name. If i can get it, i can compare in and block two different firebase values mathematically using text names.