Sammy the Sensor tries to send a message: “Hello, Cloud!”
Max the Microcontroller explains: “Computers don’t understand letters! We need to turn every letter into a number. That’s called encoding.”
Lila the LED shows the secret code chart (ASCII):
- H = 72, e = 101, l = 108, l = 108, o = 111
- “Hello” = five numbers, five bytes!
“But what about other languages?” asks Sammy. “My friend in Japan writes in Japanese!”
Max pulls out a bigger chart: “That’s Unicode! It has numbers for EVERY letter in EVERY language – even emojis! The thermometer emoji is number 127,777!”
Bella the Battery warns: “Be careful! English letters take 1 byte each, but Chinese characters take 3 bytes and emojis take 4 bytes. If you name your sensor with an emoji, your messages get BIGGER!”
Lila adds: “And here’s a cool trick – most sensors don’t even send words! Temperature 23.5 degrees? The sensor sends the number 235 (just 2 bytes) and the cloud knows to divide by 10. Way more efficient than spelling out ‘twenty-three point five degrees Celsius’!”
The Squad’s Rule: Letters are secretly numbers! English = small numbers (1 byte), other languages = bigger numbers (2-4 bytes). For sensor data, skip the words and just send numbers!