Notifications
Clear all

Printf question

4 Posts
3 Users
2 Reactions
2,308 Views
(@sj_h1)
Member
Joined: 6 years ago
Posts: 170
Topic starter  

In all my years of programming I have never seen this:

display.println(F("Hello, world!"));

What the heck is the "F" for? I see it all over this OLED 1306 example code.

 



   
Quote
(@lydara)
Member
Joined: 5 years ago
Posts: 90

   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 7 years ago
Posts: 1182
 

The Bald Engineer (awesome website BTW) has a great article on this, I generally refer people to it whenever I get this question:

https://www.baldengineer.com/arduino-f-macro.html

It's very handy when debugging with a lot of Serial.print statements, I used it this week to debug the code for my next video.

😎

Bill

 


"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
LydaRA reacted
ReplyQuote
(@sj_h1)
Member
Joined: 6 years ago
Posts: 170
Topic starter  

Thanks Bill, would have never figured it out on my own and it actually makes sense.

😉



   
ReplyQuote