Skip to content

Commit

Permalink
Merge pull request #82 from ElectronicCats/dev
Browse files Browse the repository at this point in the history
Fix serial printf bug
  • Loading branch information
DeimosHall committed Mar 19, 2024
2 parents 5e324c4 + 5229f4a commit c2940b2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 34 deletions.
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

0 comments on commit c2940b2

Please sign in to comment.