im trying to test my acp220 mosules using this website
but they are using a romeo with a dtr pin and i was wondering where abouts is that pin on an arduino uno?
im trying to test my acp220 mosules using this website
but they are using a romeo with a dtr pin and i was wondering where abouts is that pin on an arduino uno?
Tell us about your setup, and look around for a better tutorial.
The wiring diagrams don't even show the required ground connections.
Are you able to set the radios up using the RF-Magic Configure software? I cannot get the RF-Magic Configure software to work on my Win 10 computer any more nor will the USB to serial converter that came with the radios work. It seems that the converter chip is not recognized by any driver that I can find. But a newer USB to serial adapter works OK to talk the the PC, but not the RF-Magic Configure software.
So, I use a configuration utility that I found on the internet if I want to make changed to the APC220 setup and connect to an Uno as shown in the setup code.
/*
apc220.println("WR 433900 3 9 3 0");
To configure the APC220 you need to set the SET pin HIGH and then pull it down (set it to LOW).
This will put the module in configuration mode. Once it is in configuration mode you can write
the configuration to it as displayed in the above example.
The format is
WR Frequency RFDataRate OutputPower UART-Rate Series check
Possible values for all these settings:
Frequency: Unit is KHz,for example 434MHz is 434000
RF Data Rate: 1,2,3 and 4 refer to 2400,4800,9600,19200bps
Output Power: 0 to 9, 9 means 13dBm(20mW)
UART Rate: 0,1,2,3,4,5 and 6 refers to 1200,2400,4800,9600,19200,38400,57600bps
Series Checkout: Series checkout:0 means no check,1 means even parity,2 means odd parity.
*/
#include <SoftwareSerial.h>
/*
1 APC 220 SET connected to Arduino pin 8
2 APC 220 AUX not connected
3 APC 220 TXD connected to pin 4 (Uno soft serial RX)
4 APC 220 RXD connected to pin 7 (Uno soft serial TX)
5 APC 220 EN not connected
6 APC 220 VCC connected to 5V
7 APC 220 GND connected to ground
*/
const int pinRX = 4;
const int pinTX = 7;
const int pinSET = 8;
SoftwareSerial apc220(pinRX, pinTX); // Crt softserial port and bind tx / rx to appropriate PINS
void setupSoftAPC(void)
{
pinMode(pinSET, HIGH);
apc220.begin(9600);
}
void setSettings(void)
{
digitalWrite(pinSET, LOW); // pulling SET to low will put apc220 in config mode
delay(10); // stabilize please
// apc220.println("WR 433900 3 9 3 0");
apc220.println("WR 433900 3 9 3 0"); // change ss baud rate
delay(10);
while (apc220.available())
{
Serial.write(apc220.read());
}
digitalWrite(pinSET, HIGH); // put apc220 back in operation
delay(200);
}
void getSettings(void)
{
digitalWrite(pinSET, LOW); // pulling SET to low will put apc220 in config mode
delay(10); // stabilize please
apc220.println("RD"); // ask for data
delay(10);
Serial.println("reading ");
while (apc220.available())
{
Serial.write(apc220.read());
}
digitalWrite(pinSET, HIGH); // put apc220 back in operation
delay(200);
}
void setup()
{
Serial.begin(9600);
setupSoftAPC();
setSettings();
getSettings();
}
void loop()
{
static unsigned long radioTimer = 0;
unsigned long radioInterval = 5000;
if (millis() - radioTimer >= radioInterval)
{
radioTimer = millis();
apc220.println("Hello World!");
}
if (apc220.available())
{
Serial.println(char(apc220.read()));
}
}
To test 1 APC220 connected to an Uno as in the setup program and another APC220 connected to a PC through a (new) USB to serial adapter load the code below.
#include <SoftwareSerial.h>
SoftwareSerial ss(4,7);
void setup()
{
Serial.begin(9600);
ss.begin(9600);
}
void loop()
{
if(ss.available())
{
Serial.print(char(ss.read()));
}
if(Serial.available())
{
ss.print(char(Serial.read()));
}
}
Load 2 separate instances of the IDE. Upload the above code to an Uno on one instance. Set the port on that instance to the Uno port and the other instance to the USB to serial adapter port. The Uno should receive what the TTL adapter serial port sends and vice versa.
Or you can connect 2 APC220 radios to 2 Unos (or equivalent) and upload the same test code to each. Wiring the same for both Unos.
Please read the Read this before posting a programming question ... post. It makes it easier on every one if we don't have to waste time finding out fundamental information.
Is this by chance another CANSAT project ?