Adjust PICAXE settings with a mobile phone ?

Buzby

Senior Member
Hi All,

Here's another one of my half baked ideas, make of it what you will.

Background : There have been a couple of threads recently where people have wanted to allow end users to adjust settings in PICAXE devices.

Today : Following a winding route from the Imp ( Boo !, Hiss ! ) site I came across this http://www.aniomagic.com/program/?hl=en

Now its not techno-wizardry, the BBC computer could download by watching flashing squares on the telly, but the big difference now is that anyone can programme an app on a mobile phone or PC to flash the square. This is how the Imp ( Boo !, Hiss ! ) is initially given it's unique, and somewhat creepy, personality. On the Aniomagic site is a video showing a mobile phone flashing the square.

This could be a solution to the 'how to let end users change things without giving away source code' problem.

If the changes are just parameters or software switches, then an app to run on phone or PC, and a PICAXE with a photosensor ( such as a scraped-off OC71 ), might be a solution.

Just an idea,

Cheers,

Buzby
 

Buzby

Senior Member
It works !

Hi All,

Here is my first attempt at Android programming !.

It is an app to control a PICAXE by flashing a pattern that the PICAXE recognises.

http://youtu.be/Try_wgXQSSA

I forgot to pack Yellow and Green LEDs, so you just have to imagine they are different colours.

The phototransistor could do with a bit of analogue circuitry, it only gives a small change in signal when detecting the flashes.
( I did try my scraped-off OC71 first, but that was a dismal failure !. )

The app is written with Basic4Android, which is really easy to work with, and is running on a Motorola phone.

The coloured checkboxes just set a different value to be sent via the screen.

The coding is a sort of Pulse Length Modulation, with a '1' being twice as long as a ''0'.

If anyone wants the code I'll post it, but neither the Android or the PICAXE code is 'ready to run', both are just proof of concept.

Cheers,

Buzby
 

boriz

Senior Member
Nice. No reason why I can't use it on PC/Laptop. Sometimes you want to change a 'setting' very occasionally or during setup/calibration and not needing to plug it in would be a boon. Good stuff.
 

beb101

Senior Member

Buzby

Senior Member
Hi Baxter,

Thanks for your pointer to Basic4Android.

I would never have got my little app working if I was still struggling with Eclipse and the Android SDK.

You have the 'paid for' version, which gets you the libraries. What sort of things do they cover ?.

It's early days yet with me and phone programming, I might not do anymore, so I don't know if I will go for the paid for version yet.

But I was seriously impressed with Basic4Android.

I'd done no Java or Android before, but with this it just took 4 hours to download, install, learn the ropes, and write the app !.

Thanks again,

Buzby
 

beb101

Senior Member
Hi Busby,

Glad it worked out for you ... I am about as new to Basic4Android as you are. I got started with all of this by reading a post by Technical on using a tablet as a terminal for Picaxe by downloading the Slick 2 USB serial app from the Google Store. If your Android device supports USB Host, then with a OTG cable and a FTDI or Prolific adapter you can talk to the Picaxe or any other serial device. There are a lot of posts about USB on the B4A forum and apparently it has a lot of problems due to the buggy, poorly implemented support in the Android SDK. Bluetooth works just fine, however, and it has the advantage of cutting the wire.

The libraries contain code from both the B4A developer and member postings ...games, misc., utilites, app, etc.
I will attach some Apps that I downloaded to give you a flavor of what's available. Bluetooth worked out of the box; the others I haven't tried.

Also, in case you have further interest the following was contained in my license key email after my purchase. I think it permits you to buy the Enterprise Edition for $49 (50% off).

Quote from email
===========
This mail contains a unique personal coupon code which you can share with your friends.
Your friends will be able to purchase Basic4android Enterprise version for half the price (50%).
You will receive an additional year of free upgrades for every purchase done with this coupon.

You can share this coupon in any way you like, including mail, online sites, Facebook, Twitter and so on.

Your coupon code is: cldwnd

The purchase page link is: http://www.basic4ppc.com/android/purchase.html
How does it work & terms:
- User goes to the purchase page and clicks on the Plimus button.
- User enters your coupon code in the coupon field in order to receive the 50% discount.
- After purchase you will receive a notification mail.
- This offer can be terminated at any time.
- You can receive up to 4 additional years of free upgrades.
- Only new customers can use the coupon.
- A coupon code can be used for up to 20 times.

end quote
======

Baxter
 

Attachments

Buzby

Senior Member
Hi Baxter,

I just got the paid for version, using your coupon code. So now you get another year of free upgrades !.

Here is my coupon code : cwyicn

Hopefully someone will use it and get me a free year of upgrades !.

Cheers,

Buzby
 

beb101

Senior Member
Thanks Busby. I found a message in my email granting me a free year. I bought the standard version and I only had 2 months of upgrades.

Baxter
 
Top