Sending Periodic Hardware Status Updates Over RF


hello,

i'm hoping smart people can me out here =]


a little bit of background information & i'm trying do

i working on project in include ability send periodic system health / status updates base on rf.

my project has radio transmit capability , audio output ideally i'd make use of existing hardware setup.

the transmission , audio set using @ minute simple.

an arduino nano trips relay powers radio. nano trips opto isolator put radio ptt , audio generated pin 9 on nano.


very simple requirements (from point of view @ least)

in project hoping include self-monitoring (batt voltage, temp etc) , have take periodic readings throughout day, store them , transmit daily data @ set time @ end of day.



what i've tried, i've done, happened etc...


i have gotten else require project working. use real time clock keep track of real time , date. have sd card reader reading , writing , have tx hardware , code sorted. point of view working - , has had months of testing.

where struggling finding easiest , lightest way transmit bursts or packets of data collected during day.

i've been trying adapt / modify / incorporate "out of box" solutions such micromodem / micro arps , many more of popular tnc modem type software without luck. many of these programs designed run "stand alone" , far heavy , complicated needs i've had no luck in separating out tx side.


the closest i've gotten date has been using simple , lightweight library found on github called arduino rtty transmitter. https://github.com/farroid/arduino-rtty-transmitter

it says on tin not want , i'm not quite sure how modify need....


the arduino rtty transmitter library allow me pass text (string?) messages tx function "encode" rtty tones not accept variable data directly e.g.

rtty.tx("hello, test message"); work
rtty.tx(variablevalue); not work.

obviously tx function wasn't designed receive , handle data in way , i'm not entirely sure alter it.


in closing


my programming knowledge very rusty these days - i'm practically @ noob level.

i've not done real in depth programming 5 years or more besides tinkering simple things in arduino ide here , there. @ work now, wouldn't believe went college , passed c , c++ programming flying colours.

for final project wrote stock trading game in c earned me distinction. amazing how knowledge slips away when not used frequently. :(

anyway....

as far latest project goes, i'm stuck trying alter rtty tx function or possibly write second function transmitting variable data.


to honest, i'd rather use more date , faster data tx mode - takes around 10 - 15 seconds or less transmit data rtty library work.

i'm not @ skill level necessary write own code scratch in reasonable length of time. these days progress slow , struggle programs work without going reference books.


so function need modify can pass data stored in several variables , encode them rtty.. e.g battery voltage, battery current, temperature etc.

code: [select]


void rtty5::tx(char* string)
{
    char c = *string++;
    byte index = 0, pos = 0;
    byte shift = 0;
   
    while (c != '\0')
    {
        char* index = strchr(baudot_figs, c);
        if(index != null) {
            pos = index - baudot_figs;
            if(pos > 2 && shift != 1) {
                shift = 1;
                rtty_txbyte(baudot_shift_figs);
            }
            rtty_txbyte (baudot[pos]);
        } else {
            c = toupper(c);
            index = strchr(baudot_ltrs, c);
            pos = index - baudot_ltrs;
            if(pos > 2 && shift != 2) {
                shift = 2;
                rtty_txbyte(31);
            }
            rtty_txbyte (baudot[pos]);
        }
        c = *string++;
    }
}



i've spent fair few hours starring @ function running through on , on loop in head, breaking down, following through step step.

it looks me gets passed message text main program loop rtty.tx("message") , char c = *string++; think incrementally (++) scrolling through string, char char , assigns each char in string variable c while keeping index position?

then program goes while loop while (c != '\0') continue loop through until comes \0 in string signals end of string \ new line \ empty character?

so can pretty read , follow logically (with few parts don't understand in there) can't head around how adapt it.

i know try @ point won't simple , elegant i'm reaching out @ point assistance.


in meantime, i'm going continue work problem or try best find , adapt better - preferably more date , faster.


thanks in advance , sorry lengthy post. trying put down relevant information could.



 :)















you seem @ least have got works:

code: [select]

rtty.tx("hello, test message"); work
rtty.tx(variablevalue); not work.


if enough send data series of separate calls rtty.tx this:

code: [select]

rtty.tx("hello, test message");
rtty.tx( itoa( variablevalue) ); //    variablevalue int or use equivalent of itoa() required datatype.


if don't that, can assemble whole message in buffer (char array, null terminated) , send that.


Arduino Forum > Using Arduino > Programming Questions > Sending Periodic Hardware Status Updates Over RF


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino DUE ADC to DAC Piezo 30 Khz-100Khz

Indesign and MathType fonts