File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- # ArduinoLibrary .cmake
1+ # Arduino .cmake
22# Defines a function to easily add Arduino-style libraries to your CMake project.
33#
44# Example usage for arduino-SAM library from GitHub
5- # Place this in your CMakeLists.txt after including ArduinoLibrary .cmake
5+ # Place this in your CMakeLists.txt after including Arduino .cmake
66#
7- # include(${CMAKE_SOURCE_DIR}/ArduinoLibrary .cmake)
7+ # include(${CMAKE_SOURCE_DIR}/Arduino .cmake)
88# arduino_library(arduino-SAM "https://github.com/pschatzmann/arduino-SAM")
99# target_link_libraries(your_target PRIVATE arduino-SAM)
1010
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ target_compile_features(arduino_emulator PUBLIC cxx_std_17)
6060target_compile_options (arduino_emulator PRIVATE -Wno-nonportable-include -path )
6161
6262# Include Arduino library functions
63- include (${CMAKE_CURRENT_SOURCE_DIR} /ArduinoLibrary .cmake)
63+ include (${CMAKE_CURRENT_SOURCE_DIR} /Arduino .cmake)
6464
6565if (USE_RPI)
6666 target_compile_options (arduino_emulator PUBLIC -DUSE_RPI)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ void setup() {
1212 Serial.println (" Reading basic values from BME280" );
1313 // Begin communication over I2C
1414 Wire.begin ();
15- if (mySensor.beginI2C () == false ) {
15+ if (! mySensor.beginI2C (Wire) ) {
1616 Serial.println (" The sensor did not respond. Please check wiring." );
1717 while (1 ); // Freeze
1818 }
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ BME280 mySensor;
1111void setup () {
1212 Serial.begin (9600 );
1313 Serial.println (" Reading basic values from BME280" );
14- // Begin communication over SPI. Use pin 10 as CS.
15- if (mySensor.beginSPI (csPin) == false ) {
14+ // Begin communication over SPI. Use pin 13 as CS.
15+ if (! mySensor.beginSPI (csPin)) {
1616 Serial.println (" The sensor did not respond. Please check wiring." );
1717 while (1 ); // Freeze
1818 }
You can’t perform that action at this time.
0 commit comments