Hi all,
I'm building a futaba SBUS1/2 frame loss logger, and my code compiles and goes to my Arduino nano perfectly. However while using a pro mini, I get this error:
Arduino: 1.8.13 (Mac OS X), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"
Sketch uses 10554 bytes (34%) of program storage space. Maximum is 30720 bytes.
Global variables use 1136 bytes (55%) of dynamic memory, leaving 912 bytes for local variables. Maximum is 2048 bytes.
/Users/Taran/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/Taran/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbserial-0001 -b57600 -D -Uflash:w:/var/folders/2_/5p5x3bxd5q9f_5_dhm_mn7yr0000gn/T/arduino_build_534870/frame_loss_logger.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/Taran/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/Users/Taran/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbserial-0001
Using Programmer : arduino
Overriding Baud Rate : 57600
An error occurred while uploading the sketch
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
The code:
#include <Wire.h>
#include <SD.h>
#include <SPI.h>
#include "SSD1306Ascii.h"
#include "SSD1306AsciiAvrI2c.h"
#include "sbus.h"
#include <Embedded_Template_Library.h>
int frameCount = 0;
int holdCount = 0;
#define I2C_ADDRESS 0x3C
#define RST_PIN -1
SSD1306AsciiAvrI2c oled;
SbusRx sbus_rx(&Serial);
SbusTx sbus_tx(&Serial);
void setup() {
Serial.begin(115200);
while (!Serial) {}
sbus_rx.Begin();
sbus_tx.Begin(); // starting sbus communication
oled.begin(&Adafruit128x32, I2C_ADDRESS);
oled.setFont(Adafruit5x7);
oled.clear();
oled.print(" DKVP Systems FLC");
delay(4000);
oled.clear();
}
void loop() {
if (sbus_rx.Read()) {
for (int i = 0; i < sbus_rx.rx_channels().size(); i++) {
Serial.print(sbus_rx.rx_channels()[i]);
Serial.print("\t");
}
}
while (sbus_rx.failsafe()) {
holdCount = holdCount + 1;
}
oled.print("Failsafe info: ");
Serial.print(sbus_rx.failsafe());
oled.println(sbus_rx.failsafe());
oled.print("Lost Frames: ");
oled.println(sbus_rx.lost_frame());
oled.print("\t");
Serial.println("Lost Frames: ");
Serial.println(sbus_rx.lost_frame());
oled.print("Holds: ");
oled.println(holdCount);
Serial.println("Holds: ");
Serial.println(holdCount);
}
I'm using a CP2102 USB to TTL module.