#include <nRF905.h>
#include <SPI.h>
#define NODEID 2 //unique for each node on same network
#define NETWORKID 100 //the same on all nodes that talk to each other
#define GATEWAYID 1
//Match frequency to the hardware version of the radio on your Moteino (uncomment one):
//define FREQUENCY RF69_433MHZ
//#define FREQUENCY RF69_868MHZ
#define FREQUENCY nRF905_915MHZ
#define ENCRYPTKEY "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
#define IS_RFM69HW //uncomment only for RFM69HW! Leave out if you have RFM69W!
#define ACK_TIME 30000 // max # of ms to wait for an ack
#define SERIAL_BAUD 9600
char payload[] = "123 ABCDEFGHIJKLMNOPQRSTUVWXYZ";
void setup() {
Serial.begin(SERIAL_BAUD);
char buff[50];
Serial.println(buff);
}
long lastPeriod = -1;
void loop() {
Serial.println("in loop");
for (int i=0; i<0; i++){
Serial.println("Send complete");}
}
So above is my code currently that visibly shows it transmitting continuously in a loop, which is what I want. But when I try to adjust the tx power using:
Where did you add the new line ?
I am not familiar with the nRF905 library but to me the program looks like it does nothing but print messages to the Serial port.
How many times do you want to print "Send complete", or put another way, how many times will this for loop iterate ?
for (int i=0; i<0; i++){
Serial.println("Send complete");
}
I tried to add the new line into void setup. The TX is lighting up on the board so I can only assume it's transmitting like I want but I haven't put together another one to check that. I want it on an infinite loop because I'm attempting to take the power wirelessly to use for something else.
I want it on an infinite loop because I'm attempting to take the power wirelessly to use for something else.
So, starting with i equal 0, while i is less than 0, do something and then increment i. That hardly looks like an infinite loop to me. It looks more like a never-mind-I-don't-really-want-to-do-anything loop to me.
I want an infinite TX loop. I don't need it to do anything, I just want it TXing so I can use the power from it with a whip antenna on the other end. This whip antenna will be hooked up to a voltage multiplier/rectifier. So you're right, I don't want it to do anything really, other than TXing power.
so I can use the power from it with a whip antenna on the other end.
This does not make sense. You are not transmitting power. The device on the other end needs to be powered to receive data. Receiving data consumes power.
So you're right, I don't want it to do anything really, other than TXing power.
I'm sorry, you are in the wrong universe for this.
Actually Paul, I'm in the RIGHT universe, I just don't speak your language. I'm attempting to learn arduino and appreciate everyone's help even though my questions might be dumb. (Thanks to those that have messaged me with all the help!) I am attempting to use the transmitted power from the looped TX. I want to pick it up with a nearby whip antenna, run that to a voltage multiplier and rectifier so that I can use the power to charge a simple lithium ion phone batter. This is actually a neat concept right now that few people have been working on.