BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Special characters


#1

now we can’t use “°” in value widgets

Blynk.virtualWrite(V9, String(ReadF)+"°C "+String(RHumidity)+"%");

23-021853


#2

I never could get it to work that way anyhow, I always had to use the Value Display widget to add that symbol from the phone/tablet KB or use the character codes similar to emoji type characters.

29


#3

Always worked with me.

Try sending it as an unicode http://www.fileformat.info/info/unicode/char/2103/index.htm


#4

Nice thing about standards… everyone has their own :rofl:

Document says…

image

But in order to show ° I have to use ALT+248 :stuck_out_tongue:


#5

ALT 167 over here


#6

4 months ago it worked.
if I use /pin/, I can’t have the 2 values on one label.

no more french caracteres

Blynk.virtualWrite(V9, String(ReadF)+" degrés");

23-021855


#7

It is almost like there are constant changes making and breaking things :thinking:

True… I didn’t notice that :blush:


#8

Yep… º that works as well… but ALT+2103 get me 7 … go fig :smiley:


#9

before, we could use an extended ascii caratere table, now it’s forbiden !
▓╝¢│─Ö


#10

Nein!, Das ist verboten! :wink:

But in reality, probably a glitch… hopefully fixed in next release.


#11

Meanwhile , you might have to fall back on the unicode option… at least for symbols.

Blynk.virtualWrite(V63, "\u2103 \u2109");

08


#12

I have also noticed how the text input widget will not properly translate unicode…

The Blue dots on the right are from

  String strOFF = "\xF0\x9F\x94\xB5";
  Blynk.virtualWrite(V62, strOFF);

But doing the same thing from the text input results in the characters on the left.

  String textIn = param.asStr(); // Get string from Text Input Widget
  Blynk.virtualWrite(V61, textIn);

The single line which should show ALL blue dots is a combo of V61 & V62


#13

This excellent post by @Alexis_Cabrera and @Gunner gave me an idea how to improve my Blynk UI by the use of Unicode characters.


I want the “characters” on a plain white background so I’m using Styled Buttons and setting the ON/OFF back color properties to white (#FFFFFF). As you can see this works very well.

cpp
void syncProperties1 () {
  Blynk.setProperty(V29, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V27, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V27, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V30, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V30, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V31, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V31, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V32, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V32, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V33, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V33, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V34, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V34, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V35, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V35, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V36, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V36, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V37, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V37, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V38, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V38, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V39, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V39, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V40, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V40, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V30, "offLabel", "\xF0\x9F\x9A\xB6");
  Blynk.setProperty(V30, "onLabel", "\xF0\x9F\x9A\xB6");
  Blynk.setProperty(V31, "offLabel", "\xF0\x9F\x8F\x83");
  Blynk.setProperty(V31, "onLabel", "\xF0\x9F\x8F\x83");
  Blynk.setProperty(V32, "offLabel", "\xF0\x9F\x9A\xB4");
  Blynk.setProperty(V32, "onLabel", "\xF0\x9F\x9A\xB4");
  Blynk.setProperty(V33, "offLabel", "\xF0\x9F\x8F\x87");
  Blynk.setProperty(V33, "onLabel", "\xF0\x9F\x8F\x87");
  Blynk.setProperty(V34, "offLabel", "\xF0\x9F\x92\x9A");
  Blynk.setProperty(V34, "onLabel", "\xF0\x9F\x92\x9A");
  Blynk.setProperty(V35, "offLabel", "\xF0\x9F\x92\x9B");
  Blynk.setProperty(V35, "onLabel", "\xF0\x9F\x92\x9B");
  Blynk.setProperty(V36, "offLabel", "\xF0\x9F\xA7\xA1");
  Blynk.setProperty(V36, "onLabel", "\xF0\x9F\xA7\xA1");
  Blynk.setProperty(V37, "offLabel", "\xF0\x9F\x96\x90");
  Blynk.setProperty(V37, "onLabel", "\xF0\x9F\x96\x90");
  Blynk.setProperty(V38, "offLabel", "\xF0\x9F\x95\x99");
  Blynk.setProperty(V38, "onLabel", "\xF0\x9F\x95\x99");
  Blynk.setProperty(V39, "offLabel", "\xF0\x9F\x95\x96");
  Blynk.setProperty(V39, "onLabel", "\xF0\x9F\x95\x96");
}

As I only need to perform this task once I have tried different options where in the main program this section should be put as there are a lot of instructions all at once, at the moment I have a timer set to send this to Blynk every 5 minutes.

My question is: - is there a way to send this data only once?

I have tried including it into BLYNK.CONNECTED but I need to sync a lot of Vpins at the same time and this causes an overload situation.

I have tried entering both Unicode and HEX statements directly in to Blynk Styled Button fields but that doesn’t work (unless I’m doing it wrong :roll_eyes:)

There doesn’t seem to be a way of setting the button background ON and OFF to white other than changing the properties.

Richard


#14

In setup() or with BLYNK_CONNECTED() with a few small delay() interspersed. As it is a one time thing, and as long as your delays are long enough to give time, but short enough to not cause connection issues, then all should be fine.

Alternative is a couple of one time timer routines, each sending out a few commands.


#15

Hi @Gunner putting it into setup doesn’t seem to work for me… :slightly_frowning_face:

I’m using some short delays to sync Vpins because that was causing a problem,

BLYNK_CONNECTED() {
  Blynk.syncVirtual(V14, V15);
  delay(20);
  Blynk.syncVirtual(V4, V16);
  delay(20);
  Blynk.syncVirtual(V17, V18);
  delay(20);
  Blynk.syncVirtual(V20, V21);
  delay(20);
  Blynk.syncVirtual(V22, V5);
  delay(20);
  Blynk.syncVirtual(V1, V2);
  delay(20);
  Blynk.syncVirtual(V19, V41);
  bnkServCon = 1;
  rtc.begin();
} 

Blynk.syncAll just causes a blockage, the only way I can successfully do it is by inserting a delay between and syncing 2 pins at a time.

So yes, as this is a “one time” operation I could add it to the BLYNK.CONNECTED and break it down into chunks with a short delay in between.

A one time timer routine? What is this?

Richard


#16

I don’t understand what you are using the sync commands for… I was referring to the set property ones.

As long as the Blynk.setproperty() commands come after the Blynk connection routines, they should work just fine in setup()

… or as stated, just use the BLYNK_CONNECTED() function, but perhaps with a bunch of Lambda Timer Functions and timout timers.

For example, a set of four commands every two seconds. Play with the timing… perhaps 1/2 or 1 second between each batch; More or less commands per batch, etc.

BLYNK_CONNECTED() {

  // Batch 1
  Blynk.setProperty(V29, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V27, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V27, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V30, "onBackColor", "#FFFFFF");


  // Timed Lambda Function - Batch 2
  timer.setTimout(2000L, []() {  // Run in two seconds
  Blynk.setProperty(V30, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V31, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V31, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V32, "onBackColor", "#FFFFFF");
  });

  // Timed Lambda Function - Batch 3
  timer.setTimout(4000L, []() {  // Run in four seconds
  Blynk.setProperty(V32, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V33, "onBackColor", "#FFFFFF");
  Blynk.setProperty(V33, "offBackColor", "#FFFFFF");
  Blynk.setProperty(V34, "offBackColor", "#FFFFFF");
  });

  // and so on...

}

#17

Unlike the Labeled Display Widget, I don’t think it is properly supported in most new widgets :frowning: … just like the text input widget…


#18

Okay got it!! Thanks @Gunner you made me think again…

I tried putting the set properties into the setup routine before and it didn’t work, I must have had a “brain drain” at that time as I didn’t put a condition statement in.

i.e.
if (Blynk.connected()) {
Blynk.setProperties…
}

Richard


#19

I have had same issues when i changed 8 backgrounds color styled button at the same time.
finally, I am using stage timer function, now blynk have no disconnection.
:joy:
for using ASCII table or Unicode, I prefer to use #define


#20

@Alexis_Cabrera

Changing the properties and labels of 10 styled buttons seems to work okay for me now in setup(). (once I’d included the condition statement :roll_eyes:)…

It just takes a longer time to exit the setup routine and enter the main program, but as it’s a one time routine I can live with that.

Richard