I’m trying to set up my first Blnyk project on my BananaPi.
The first examples from the Blynk example browser went pretty well.
But when I tried to use the terminal Widget (this example: https://examples.blynk.cc/?board=Raspberry%20Pi&shield=System%20default&example=Widgets%2FTerminal ) the compiler comes up with the error message: ‘class WidgetTerminal’ has no member named ‘println’ …
I believe I’m making a stupid error. But unfortunatley I’m not an expert and have no idea how to fix this.
It would be really great if someone could give me a hint.
Thanks a lot!
The problem is in the differences in hardware and supported languages. When it comes to the Linux based devices like the Pi and clones, the Sketch Builder still shows examples in Arduino code (C++) so you can’t actually use that example.
@Dmitriy@vshymanskyy In the Sketch Builder, I think that when choosing these types of hardware, there should either be correct language sketches or left blank (marked as not available or something) so as not to confuse new users.
@Gunner, it’s just Linux implementation, that is missing some convenience functions. We cannot currently invest time info making it “fully complete”, and we don’t want to make default sketches too hard to understand for other platforms to.
And, BTW, we do not want to maintain completely different sets of examples for every “exceptional” hardware.
Unfortunately it needs some tweaking at the moment.
I only brought it up because I think this is the 2nd time recently that I have seen someone report about trying to load a C++ example into a RPi or similar hardware, just because it shows up in the examples for that hardware.
Basicly, new users can’t try to shove a square peg into a round hole if you don’t hand them the square peg in the first place
@Gunner thanks a lot for that explanation. And you are completely right: it is totally confusing if you select a sketch in the example browser for a certain hardware and than it does not work for that hardware… So a hint in the example browser would be really helpful…
My intention by using the example was to see how I have to work with the terminal widget in combination with my BananaPi.
Since I have already that Using C++ on a Raspberry Pi with Blynk example up and running for me the question is more: how could I use the terminal widget on the BananaPi? Is there a documentation how I can output something from the Banana to the terminal widget on my iPhone? Why does the compiler brings up the above mentioned error? What do I have to use instead of println?
Or is the terminal widget in general not usable with a PI (if necessary I would also set up a Raspberry Pi)?
Thank you so much for your help!
@Costas THANKS!!! That worked! Now I get an output. You made my day!
Hopefully you don’t mind when I also ask for the opposite way: when I enter something in the input line of the terminal widget, how can I read this within the PI?
@tho For the most part, all Blynk commands work the same way regardless of language, as they are Blynk Library specific, not “language” specific. However, there do seem to be a few situations where figuring out the language specific syntax to fit then into can get trickier, at least for me
@Costas again thanks a lot. Now I get in- and output :-).
@Gunner yes you bring it to a very good point. My impression after reading Costas advice was that there must be a generic setup behind. And your comment really brings this very precisely on the point. So I have to investigate here into some research. Normally it works pretty well starting with an example, seeing how it works, enhancing it and getting so step by step the “complete” picture. Thanks!
Hi, i am playing around with Blynk and RPi, and i am having the same problems you had. I have tried the changes suggested by Costas, but i might be writing it all wrong because it does not compile. Do you mind sharing your code or at least a working example so i can learn how to make it work?