XClose
List Archives : http://void.nothingness.org
List Archives

XTension Discussion

Re: Macworld article on microcontroller interfacing

From: Jack Stewart <jacks-AT-amug.org>
Date: 16 May 2008 05:55:50 UTC   (11:55:50 PM in author's locale)
To: xtensionlist-AT-shed.com
Before we get off on the subject of Arduino or some other tangent is there any chance of getting a new and stable version of Xtension released this year.

I think that it is way overdue!

Jack



On 5/15/08, Rob Lewis said ……

>This is mentioned in the Macworld article:
><http://tinker.it/now/2007/04/26/control-your-mac-from-arduino-the-
>easy-way/>
>
>It's a simple Mac app that listens to the Arduino for single-
>character messages. Each different character can trigger the
>execution of a different AppleScript.
>
>Maybe not bad for quick & dirty applications?
>
>On May 15, 2008, at 9:33 AM, James Sentman wrote:
>
>>
>> On May 15, 2008, at 11:45 AM, Rob Lewis wrote:
>>
>>> OK, let me take a shot at decoding this (James, you may have been
>>> spending too much time around Unix geeks :-)
>>>
>>> --Somebody (such as, for example, me) writes code to execute on
>>> the Arduino. This code looks for events on its sensors and reports
>>> them over the USB bus.
>>>
>>> --Somebody else (such as, for example, you) writes code to run on
>>> the Mac. This code receives the reports from the Arduino and …
>>> what, exactly?
>>>
>>> Aargh, I'm lost again.
>>> --Where exactly does your "conduit" run? Is it part of XTension?
>>> --Where does the Arduino API run? In the Arduino microcontroller
>>> itself?
>>> --Is this a 2-way interface?
>>> --What does "in our arduino work" mean exactly?
>>> --Where does the proposed command "XTTurnOn" occur? In unit
>>> scripts? Why is it needed over standard XTension verbs?
>>> --It sounds like you are proposing mapping X10 unit addresses to
>>> inputs and outputs on the Arduino board. Am I close?
>>>
>>> Waaah! Maybe a block diagram would help :-{
>>>
>>> (Want to continue this offline?)
>>
>>
>> I think you're making this too complex ;)
>>
>>
>> i thought it would be interesting to provide a way to easily get
>> information about units from XTension to the arduino board, and get
>> information out of the arduino board back into XTension.
>>
>> THink about how you would do that now. Say you wanted to have a
>> unit in XTension turn on an LED connected to the arduino board.
>> Well, you'd make a pseudo in XTension with an applescript that told
>> some scriptable serial port device to write something to the serial
>> port that the arduino was connected to, then you'd write some code
>> on the arduino that read that serial data, parsed it out into
>> useful bits and figured out what to do with it. To go the opposite
>> direction you'd have to do something similar. a contact closure
>> connected to the arduino causes a bit of your code on the chip to
>> run, that would write some data up the serial port which would be
>> read by the scriptable app that was connected to it, which would
>> read it, parse it out for useful bits and applescript the pseudo in
>> XTension again? This gets all very complicated in a hurry ;)
>>
>> What of instead of just raw "write some series of bits to the
>> serial port" on the arduino, it actually had a command that you
>> could just call that said "set the value of XTension unit B1 to
>> 175" and that took care of talking up the serial port and
>> communicating with XTension. Thats all I'm suggesting. Almost
>> anybody here could write enough arduino code to do that! But it
>> would take quite a bit more in the way of chops and patience to
>> design your own serial protocol to handle that and then write both
>> the arduino portion and the applescript portion on the host to do
>> it, plus then yo'uve got lots of programs and bits and pieces in
>> the middle and it gets complex and easy to get hosed up.
>>
>> I think it should be possible to provide an interface in XTension
>> that interfaced to some starter code that we could provide as a
>> starting place for arduino work. So that if a unit is controlled in
>> XTension a very simple method is run in the arduino automagically
>> by this code allowing you to turn on and off something with just a
>> line of code or 2. The opposide direction would be just as easy.
>>
>> So we provide the "verbs" in the arduino itself for controlling
>> XTension and being controlled by XTension and then YOU customize
>> those in any way you like.
>>
>> So now instead of designing a serial protocol and writing a bunch
>> of complex bit parsing code on the pic chip in there, you're
>> writing something much more similar to what you do in XTension. Oh,
>> I got an ON for A1, so I want to turn on digital IO pin 3 or
>> something like that.
>>
>> We could even do a basic setup out of the box which provided some
>> basic simple input/output control... I'll have to re-read the
>> documentation now to see what is possible. But perhaps it begins to
>> make sense? I'ts like just a data capture system, but it could be
>> so much more if you wanted it to be.
>>
>> -J
>>
>>
>> Thanks,
>> James
>>
>>
>> James Sentman sentman.com http://
>> MacHomeAutomation.com
>>
>>
>>
>
Previous message in thread   |   Next message in thread

Thread

Re: Macworld article on microcontroller interfacing / Jack Stewart <jacks-AT-amug.org> / 16 May 2008

* List Archives

IMC GeneralRA-LThe Graphics ListThe Situationist ListXTension Discussion
 

This site made manifest by Manifesto software

Page executed in 0.37825894355774 seconds.
Loaded 106 classes from 6 of 10 total class files. Read 3 objects from the database. Served 2 items from the cache.
Queries - count: 2 select: 4 update: 1