|
Post by c3po on May 17, 2019 17:03:37 GMT
I initially wanted to upload my program directly to the Arduino as I could not physically access the micro usb port on my Nano's in a particular project
I am yet to do this but as a side benefit explained in this article
When you program an Arduino's processor using ISP, usually the entire processor chip memory is erased, including the bootloader area, and your sketch is written.
So, when you upload a sketch to the Arduino using ISP, the Arduino no longer has a bootloader on it.
This means the next sketch you upload to it must also be uploaded using ISP.
and here is an interesting bit that caught my attention
You may want to upload a sketch to an Arduino with ISP because you want your sketch to:
start right away after power on or reset,
or because you don't want the bootloader on board to accept another sketch
or to attempt using the serial pins
or to flash pin 13.
|
|
|
Post by dave on Jun 12, 2019 17:11:33 GMT
Very Interesting................
PROJECT: Landrover D90. Program a NANO via ISP, allowing RX0 to be used by Flysky Ibus 10ch reader.
On the Shannon I used a MEGA RX1 to read the Ibus. But the NANO only has one RX.
Do you think this is possible?
|
|
|
Post by c3po on Jun 12, 2019 17:38:45 GMT
Hi Dave, Not sure I get your intention but I think this may help from the article You may wonder how the Arduino knows when serial communication is trying to send it a sketch to load, or just communicating through the serial monitor with the sketch that is already running on the Arduino? The answer is simple. The bootloader program that accepts sketches and reprograms the Arduino only runs in the first couple of seconds after the Arduino's processor is reset. If the bootloader program running on the Arduino does not receive a certain sequence of characters indicating a sketch is attempting to upload, it quits running and starts the sketch that you loaded previously.
But why don't you use SoftwareSerial library or better still AltSoftSerial?
|
|
|
Post by dave on Jun 12, 2019 17:52:43 GMT
So possibly, don't use rx/tx for screen debugging, then rx would be available for reading the IBUS signals.
SoftwareSerial / AltSoftSerial was a thought if can't read ibus to RX0.
Experiment tomorrow, pull hair out around 2pm...
|
|
|
Post by ktm30600 on Jun 13, 2019 10:32:41 GMT
Thank you c3po Bill
|
|
|
Post by c3po on Jun 13, 2019 10:39:45 GMT
Hi Dave - you could always use i2c to write debug values to another Arduino/ i2c display etc and avoid the serial traffic
OR
Get it all working on a Mega using the multiple serial ports and then when completed disable all the debug printing and just use the serial port for reading IBUS and then switch back to Nano
|
|
|
Post by dave on Jun 13, 2019 11:28:28 GMT
Initial test shows that the flysky Ibus can be read into a nano...
/* * Test FlySky IBus interface on an Arduino Mega. * Connect FS-iA6B receiver to Serial1. */ #include "FlySkyIBus.h" int led=13; word ch0v; void setup() { pinMode(13,OUTPUT); Serial.begin(115200); IBus.begin(Serial); }
void loop() { IBus.loop(); ch0v = map(IBus.readChannel(0),990,1990,0,255);
if(ch0v <128) digitalWrite(led,LOW); else digitalWrite(led,HIGH);
}
|
|