Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serial printf bug #82

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions examples/IMU_Zero/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
# BOARD_TAG = arduino:mbed_rp2040:pico
BOARD_TAG = rp2040:rp2040:rpipico
MONITOR_PORT = /dev/cu.usbmodem11401
# BOARD_TAG = rp2040:rp2040:rpipico
BOARD_TAG = esp32:esp32:XIAO_ESP32C3
MONITOR_PORT = /dev/cu.usbmodem132401
ARDUINO_CLI_PATH := arduino-cli

help:
@echo "Usage: make [target] [BOARD=rp2040|esp32|esp32s3]"
@echo "Targets:"
@echo " compile: compile the firmware"
@echo " upload: upload the firmware to the board"
@echo " monitor: monitor the serial port"
@echo " clean: clean the cache"
@echo " all: compile, upload, monitor"
@echo "Examples:"
@echo " make compile BOARD=rp2040"
@echo " make upload BOARD=rp2040"
@echo " make all BOARD=esp32s3"

compile:
$(ARDUINO_CLI_PATH) compile --fqbn $(BOARD_TAG) --export-binaries

Expand Down
20 changes: 4 additions & 16 deletions examples/MPU6050_raw/Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
# BOARD_TAG = arduino:mbed_rp2040:pico
BOARD_TAG = rp2040:rp2040:rpipico
MONITOR_PORT = /dev/cu.usbmodem11401
# BOARD_TAG = rp2040:rp2040:rpipico
BOARD_TAG = esp32:esp32:XIAO_ESP32C3
MONITOR_PORT = /dev/cu.usbmodem132401
ARDUINO_CLI_PATH := arduino-cli

help:
@echo "Usage: make [target] [BOARD=rp2040|esp32|esp32s3]"
@echo "Targets:"
@echo " compile: compile the firmware"
@echo " upload: upload the firmware to the board"
@echo " monitor: monitor the serial port"
@echo " clean: clean the cache"
@echo " all: compile, upload, monitor"
@echo "Examples:"
@echo " make compile BOARD=rp2040"
@echo " make upload BOARD=rp2040"
@echo " make all BOARD=esp32s3"

compile:
$(ARDUINO_CLI_PATH) compile --fqbn $(BOARD_TAG) --export-binaries

upload:
@$(ARDUINO_CLI_PATH) upload -p $(MONITOR_PORT) --fqbn $(BOARD_TAG) --verbose

monitor:
@$(ARDUINO_CLI_PATH) monitor -p $(MONITOR_PORT) --config baudrate=38400
@$(ARDUINO_CLI_PATH) monitor -p $(MONITOR_PORT) --config baudrate=9600
# screen $(MONITOR_PORT) 9600

clean:
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MPU6050
version=1.3.0
version=1.3.1
author=Electronic Cats
maintainer=Electronic Cats <store@electroniccats.com>
sentence=MPU6050 Arduino Library.
Expand Down
4 changes: 2 additions & 2 deletions src/MPU6050_9Axis_MotionApps41.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ THE SOFTWARE.
// after moving string constants to flash memory storage using the F()
// compiler macro (Arduino IDE 1.0+ required).

//#define DEBUG
// #define DEBUG
/* Control whether debugging macros are active at compile time */
#undef DB_ACTIVE
#ifdef DEBUG
Expand Down Expand Up @@ -597,7 +597,7 @@ uint8_t MPU6050_9Axis_MotionApps41::dmpInitialize() {
#ifdef DEBUG
DEBUG_PRINT(F("Read bytes: "));
for (j = 0; j < 4; j++) {
DEBUG_PRINTF(dmpUpdate[3 + j], HEX);
DEBUG_PRINT(dmpUpdate[3 + j], HEX);
DEBUG_PRINT(" ");
}
DEBUG_PRINTLN("");
Expand Down
Loading