Back to my ancestry

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 11:40 am

Ok, Ok, I am not a descendant of Harald Bluetooth, but I am a descendant of Thorfinn Skullsplitter, which,
when push-comes-to-shove, or a cracked skull, makes no difference. 8)

To wit my Blue-bot:
-
BB3 copy.jpg
BB3 copy.jpg (78 KiB) Viewed 3930 times
-
Which is a funky computer turtle pretending to be something else that can be controlled via Bluetooth . . .

It has some buttons on its top for very basic direct control:
-
BB1 copy.jpg
BB1 copy.jpg (80.93 KiB) Viewed 3930 times
-
BUT, via Bluetooth one can control it rather better:
-
SShot 2023-02-18 at 12.14.12.png
-

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 11:42 am

Now, I have demonstrated several times my stacks for Turtle Graphics, and, as such,
they are fine and dandy . . .
-
SShot 2023-02-18 at 13.04.44.jpg
-
BUT what I do NOT know how to do is to send those instructions as signals to something via Bluetooth.

https://www.tts-international.com/blue- ... 15269.html
Last edited by richmond62 on Sat Feb 18, 2023 12:06 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 11:58 am

The Blue-Bot comes with its own, free, software for Mac and Windows:
-
SShot 2023-02-18 at 12.48.47.png
-
which, frankly, leaves me cold as it will ONLY work when you choose a floor mat, and at prices like this
for floor mats . . .
-
SShot 2023-02-18 at 12.54.52.png
-
so should like to make my own way of sending signals to the thing with LiveCode, so it can navigate the planks
on my floor, or whatever the kids have worked out in my school(s):
-
SShot 2023-02-18 at 12.57.23.jpg

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 12:00 pm

So:

Q1. How do I pair a Bluetooth device with a computer (and here I mean either Mac or Linux) in such a way that a LiveCode stack
can send signals to that Bluetooth device?

Q2. How do I work out WHAT signals need to be sent for the movements to be actuated?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Back to my ancestry

Post by jacque » Sat Feb 18, 2023 6:02 pm

This might help to get the codes: https://stackoverflow.com/questions/238 ... th-traffic
But LC doesn't support bluetooth on Android. There's an external for iPhone but that's all.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 6:25 pm

AND, of course answers that mention mergBLE are not really of interest to me as I do not have:

1. A licence for current LiveCode [nor likely to with my income from LiveCode programming averaging $200 a year].

THIS looks promising, but . . .

https://forums.livecode.com/viewtopic.p ... 69#p203869

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 6:26 pm

But LC doesn't support bluetooth on Android. There's an external for iPhone but that's all.
That's interesting, but I am looking for a way to send Bluetooth instructions from a desktop/laptop running Win/Lin/Mac.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Back to my ancestry

Post by jacque » Sat Feb 18, 2023 8:25 pm

I should have said, LC doesn't support bluetooth on any OS except iOS.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Back to my ancestry

Post by richmond62 » Sat Feb 18, 2023 8:50 pm

Blast and D*mn!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Back to my ancestry

Post by jacque » Sun Feb 19, 2023 12:00 am

Some years ago LC ran a survey asking what feature we'd most like to see. I said USB. If they ever ask again I'd say Bluetooth.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

PaulDaMacMan
Posts: 683
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Back to my ancestry

Post by PaulDaMacMan » Tue Feb 21, 2023 5:27 pm

jacque wrote:
Sun Feb 19, 2023 12:00 am
Some years ago LC ran a survey asking what feature we'd most like to see. I said USB. If they ever ask again I'd say Bluetooth.
Not sure what your desired use is, but I did make a Builder Extension wrapper for the HID API library (same as used by PyGame) which can receive (but no send data to, it's an unfinished wrapper) input from both USB and Bluetooth Human Interface Devices such as GamePads, Braille Readers, Barcode Scanners, Coin Slots, etc. It's open source and cross-platform (Mac,Win,Linux probably could be made to work on Android too).

Richmond linked to the release announcement thread above.
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

PaulDaMacMan
Posts: 683
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Back to my ancestry

Post by PaulDaMacMan » Tue Feb 21, 2023 5:54 pm

richmond62 wrote:
Sat Feb 18, 2023 6:25 pm
AND, of course answers that mention mergBLE are not really of interest to me as I do not have:

1. A licence for current LiveCode [nor likely to with my income from LiveCode programming averaging $200 a year].

THIS looks promising, but . . .

https://forums.livecode.com/viewtopic.p ... 69#p203869
jacque wrote:
Sun Feb 19, 2023 12:00 am
Some years ago LC ran a survey asking what feature we'd most like to see. I said USB. If they ever ask again I'd say Bluetooth.
The HID API Library Builder Extension can only receive input from both USB and Bluetooth Human Interface Devices (GamePads, Braille Readers, Barcode Scanners, Coin Slots, etc), devices must be a HID class compliant device to work with that library, it also can not send data to an HID device. It is an unfinished wrapper, I was mostly interested in input (GamePads, GuitarHero Drum Pads, etc.) at the time that I wrote that, but IIRC there were some functions for sending data to an HID device but I'm not sure If I even own a device I could test that with, and even if that part was wrapped it still wouldn't help with the device in question unless it's a HID class compliant device (a class compliant devices are ones that will often works out of the box without a installing a proprietary device driver). I can't tell from their website if it is an HID compliant device, so probably no turtle toy joy for you!

I have looked a bit at related libraries (libUSB) and APIs (Apple's IOBluetooth) that could unlock more general use capabilities for sending/receive arbitrary data with sorts of devices, but it seems like a LOT to wrap for either of those, potentially a lot of work to get to a usable state, in contrast to HID API library which was rather small and simple to wrap and is cross-platform (unlike IOBluetooth for example).

If you could find a nice open-source (GPLv3 compatible license), preferably cross-platform, and fairly small / high-level API for enumerating synced Bluetooth devices and then connecting to send/receive arbitrary data to/from them, then I would consider wrapping it up for the community (but again, I'm not sure what devices I have that I could test that with).
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

PaulDaMacMan
Posts: 683
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Back to my ancestry

Post by PaulDaMacMan » Tue Feb 21, 2023 6:28 pm

Hell I'd consider wrapping platform specific but maybe just the relevant bits too if you con find some simple source examples of what you need on Stack Exchange or wherever. Translating some Python/PyObjC code I found lead me to wrap a bunch of Core Image (Filters) stuff this past weekend!
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

Post Reply