Skip to content

Instantly share code, notes, and snippets.

@Pharap
Created August 25, 2018 11:13
Show Gist options
  • Select an option

  • Save Pharap/6f08bdf052b9a81f97b969a2f03347fc to your computer and use it in GitHub Desktop.

Select an option

Save Pharap/6f08bdf052b9a81f97b969a2f03347fc to your computer and use it in GitHub Desktop.
ino vs cpp example
// cpp files require these includes
// ino files do not
#include <Arduino.h>
#include <Serial.h>
// cpp files require this predeclaration
// ino files do not
void sendMessage(void);
void setup(void)
{
}
void loop(void)
{
sendMessage();
}
void sendMessage(void)
{
Serial.println(F("Hello world"));
}
void setup(void)
{
}
void loop(void)
{
sendMessage();
}
void sendMessage(void)
{
Serial.println(F("Hello world"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment