How to put a 16bit integer into 2 bytes (tip from Matt)

Posted on
Tue Aug 10, 2004 1:57 am
netbox offline
Posts: 30
Joined: Jul 25, 2004

How to put a 16bit integer into 2 bytes (tip from Matt)

I had to convert a 16 bit integer
into 2 bytes.

these line works.
have fun.


set my16bit to 257
set LSB to (my16bit / 256) as integer
set MSB to my16bit - LSB
display dialog "LSB: " & LSB & return & "MSB: " & MSB

Posted on
Wed Aug 11, 2004 1:47 pm
gregjsmith offline
Posts: 946
Joined: Apr 01, 2003
Location: Rio Rancho, NM

(No subject)

Interesting. Why would you need to do this?

Posted on
Wed Aug 11, 2004 2:01 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

gregjsmith wrote:
Interesting. Why would you need to do this?

I have written a utility application for making communication with serial hardware easy from AppleScript. It still needs a bit of polish, but I plan on posting a beta in the next few days. It will be handy for communicating with all sorts of serial hardware (thermostats, X10 interfaces not supported by Indigo, etc.). I wrote it to do some custom Crestron communication I needed, but figured I would package it up as a utility application to sell for a few bucks.

I'll let netbox describe why he was wanting the 2 byte integer to byte conversions.

Regards,
Matt

Posted on
Wed Aug 11, 2004 3:07 pm
gregjsmith offline
Posts: 946
Joined: Apr 01, 2003
Location: Rio Rancho, NM

(No subject)

support wrote:
I have written a utility application for making communication with serial hardware easy from AppleScript. It still needs a bit of polish, but I plan on posting a beta in the next few days. It will be handy for communicating with all sorts of serial hardware (thermostats, X10 interfaces not supported by Indigo, etc.). I wrote it to do some custom Crestron communication I needed, but figured I would package it up as a utility application to sell for a few bucks.


<drewl>Ohhh... me looks forward to that</drewl>

Posted on
Wed Aug 11, 2004 6:49 pm
netbox offline
Posts: 30
Joined: Jul 25, 2004

Something like a tiger.......

Another cat is coming to the mac,

Ocelot support for Indigo is on the way.


Martijn

Posted on
Wed Nov 04, 2015 1:22 pm
mrg1 offline
Posts: 6
Joined: Oct 26, 2015

Re: How to put a 16bit integer into 2 bytes (tip from Matt)

Is the software from yesteryear that supports ADI modules (Serial bridge and the Indigo - Ocelot plugin) compatible with Indigo 6 pro and if so is there any possibility of making this available for those with an investment in ADI kit?

martin

Posted on
Wed Nov 04, 2015 1:51 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How to put a 16bit integer into 2 bytes (tip from Matt)

Serial Bridge has been discontinued for 5 years now and doesn't run on any modern Mac OS version, so this solution won't work.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 18 guests

cron