X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SSZuYUF8TzEwJ1wJhSG7grjB/BwO8mVLddOhLAU0Kdo=; b=ppBlibzKO5USOjhcwJ2RjKmXpO+dF1Lhlll7opog4agHuT7Ikm+wPRdmaLOlh1l/k+ okuyoY6l30IFITw9St2Eb2La4doccnXWGdcTW1hwqee/n5p5LUE0BOJtoB5rMPybEv47 C9liPSk/CnlBe+wwjW6rpsXatyedDcnQ+vRJKrcCaXsRvfGdMn/1cattmsC9I+PWrG81 scrlPezBWfoa8leq9UXHSWjU0W6Zughr7tX6BWTVqv1tYu/wAZ0plcoqxaY3J1LYOZxC UOQo5RDsUV9bhc97iCbf3CbzuLcePRYw4haBQESjvojuLZPR3xQKMQmGnNMW0hsAIprG IrvQ== MIME-Version: 1.0 In-Reply-To: <5040BF06.9040601@ecosensory.com> References: <5040BF06 DOT 9040601 AT ecosensory DOT com> Date: Fri, 31 Aug 2012 15:58:34 +0200 Message-ID: Subject: Re: [geda-user] OT scripting inside an MCU From: Levente To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=bcaec51b1b211c9ceb04c8903086 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --bcaec51b1b211c9ceb04c8903086 Content-Type: text/plain; charset=ISO-8859-1 I have my own protocol developed. The nodes are on a RS485 bus. A large system can have multiple RS485 buses. On the root node there is a RTOS (also my code), but on the sensors and actor nodes there's only a while(1) loop. I don't know how to solve the programmability with your approach. Maybe I wasn't clear enough. I want to change the program at run time as well for example by writing an SMS to the integrated GSM modem, or editing from a keypad, etc. I could write code in native C of course, but I don't want to re-program the root-card each time I want to set new temperature, etc. It's not just for playing, I want to implement this. On Fri, Aug 31, 2012 at 3:41 PM, John Griessen wrote: > On 08/31/2012 08:14 AM, Levente wrote: > >> I'd like to implement something on the root node, that can read some >> piece of program from its flash or EEPROM and execute it, >> like read this temperature sensor, read that humidity sensor, do some >> math, write to that actor, which turns on a fan. >> > > You could look for projects and find something complicated, but if it's > just to learn and play with, > you make a real time control loop of code on every microcontroller, and > every subroutine it runs comes from that. > That way, it never gets stuck in a loop. A response from a non-master > node can never block anything by the master, > so a response can just be to set some flag, but other wise initiate > nothing and > wait for the master program to read that flag and go into action. > > What kind of network communication are you using? > > John > --bcaec51b1b211c9ceb04c8903086 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have my own protocol developed. The nodes are on a RS485 bus. A large sys= tem can have multiple RS485 buses.

On the root node there is a RTOS = (also my code), but on the sensors and actor nodes there's only a while= (1) loop.

I don't know how to solve the programmability with your approach. M= aybe I wasn't clear enough. I want to change the program at run time as= well for example by writing an SMS to the integrated GSM modem, or editing= from a keypad, etc. I could write code in native C of course, but I don= 9;t want to re-program the root-card each time I want to set new temperatur= e, etc.

It's not just for playing, I want to implement this.

On Fri, Aug 31, 2012 at 3:41 PM, John Griessen <john= @ecosensory.com> wrote:
On 08/31/2012 08:14 AM, Levente wrote:
I'd like to implement something on the root node, that can read some pi= ece of program from its flash or EEPROM and execute it,
like read this temperature sensor, read that humidity sensor, do some math,= write to that actor, which turns on a fan.

You could look for projects and find something complicated, but if it's= just to learn and play with,
you make a real time control loop of code on every microcontroller, and eve= ry subroutine it runs comes from that.
That way, it never gets stuck in a loop. =A0A response from a non-master no= de can never block anything by the master,
so a response can just be to set some flag, but other wise initiate nothing= and
wait for the master program to read that flag and go into action.

What kind of network communication are you using?

John

--bcaec51b1b211c9ceb04c8903086--