Finding functions...

Greetings everyone...

I'm currently looking at a code example for MPU-6050 usage, written by Jeff Rowberg.

In this code there are statements that use a function called 'F' with a double quoted string as a parameter.

My first question is, in a case like this where I want to know what 'F(string)' does, how do I locate where the function comes from. I mean is there an IDE based way to easily find the function/method or its declaration? Or am I forced to try to search all the includes until I find it. I've looked at the Arduino IDE reference page and cannot find anything; and I seriously doubt there would be an official function named 'F'...

The only includes in the code example are:

#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#include "Wire.h"

and here are a couple of lines using the function:

  // verify connection
  Serial.println(F("Testing device connections..."));
  Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed"));

What general procedure would one of you experienced folks follow to track down what 'F' is?

I'd read the manual

(F is a macro, not a function)


This is the link for the above quote.

This is the link for the above quote.

Awesome! Thank you!

Follow on question: Where can I read more to help me understand why I might want to use the flash memory versus SRAM?

If you're using constant literal strings, use flash, otherwise use RAM.

first link in the article about PROGMEM:

Some things for you to master:

Arduino links of interest.

How to use this forum:

Listing of downloadable 'Arduino PDFs' :
Either Google >>>- - - - > arduino filetype: pdf

Listing of downloadable 'C++ PDFs' :
Either Google >>>- - - - > C++ filetype: pdf

Arduino cheat sheet:

Troubleshooting common errors:

Watch these:
Arduino programming syntax:

Arduino arithmetic operators:

Arduino control flow:

Arduino data types:

Some things to read

Language Reference:


How and Why to avoid delay():

Demonstration code for several things at the same time.

Useful links:

Arduino programming traps, tips and style guide:

Jeremy Blume:

Arduino products:



Share tips you have come across, 500+ posts:

Images from above:“Share+tips+you+have”+larryD+site:

Debug discussion: