PROJECT FILE

Rickharris

Senior Member
Many people have suggested a place for finished projects in this forum, pending that event I will post here the code and description for a few things I have done - they may prove interesting to others particularly new starters.

Any one else who would like to join in please do. Pictures can be posted in the Howwhatwhy forum at <A href='http://forums.howwhatwhy.com/ubbthreads.php' Target=_Blank>External Web Link</a> You don't need to register but it will give you greater access. The forum is free and TOTALLY ADVERT FREE! and linked to here by copying the URL into your post.
 

Rickharris

Senior Member
I have been playing with a Ultrasonic TX/RX and tought perhaps i could make a blind aid. This is the results of the first experiments.

The US module is mounted on the end of a cane so that it is more or less at floor level. This allows the used to scan the area by moving the cane and also benefit from the normal use of the cane.

The system is controlled by a Picaxe08 as described in the data sheet.

The code below produces 3 tones, a low click when everythig is OK this assures the user that the system is working.

A higher faster tone at about 1 meter - You are close to an object.

A high tone ant about half a meter to say stop and think, you are very close to an object.

Although not fool proof this seems to work initially. further development will look to output to stereo ear phones to give binaural input to the user.

Code:
'================================
'Use picaxe 08 to drive rev ed Ultrasonic module
'===================================
symbol trig=1
symbol echo=3
symbol range=w1


start:

pulsout trig,2
pulsin echo,1,range
pause 10

let range=range*10/62



if range &lt;50 then speed1
if range &lt;90 then speed2
if range &lt;110 then speed3

b4=5000
b6=10
gosub tick
goto start

speed1:
b4=10
b6=125
gosub tick
goto start

speed2:
b4=50
b6=100
gosub tick
goto start

speed3:
b4=2500
b6=30
gosub tick
goto start

tick:


for b5=1 to 3

sound 2,(b6,2)

pause b4
next b5
goto start


 

Rickharris

Senior Member
This is a sort of Universal programme to allow the control of a simple bump and go robot. The robot is controlled by a Picaxe 08 and an L293 motor driver. the 3 volt motors have a 120:1 gear boxis makes them slow but suitable for desktop use.

Code:

'=======================================
'Universal Buggy control for Picaxe 08 and L293
'Outputs 0,1,2,4 may need to be swapped around if connections to motors are different.
'===========================================

symbol RB=0
symbol RF=1
symbol LB=2
symbol LLF=4
start:
high RF 'fwd
high LLF 'fwd
check:
if pin3=1 then turn
goto check

turn:
low RF 'stop
low LLF
high RB 'back up
high LB

wait 2
low RB 'turn
high RF

wait 2
low LB
low RF

goto start




 

Rickharris

Senior Member
Not my projects this time but there look to be some good ideas here that could be Picaxe reverse engineered.
<A href='http://www.bmumford.com/art/box.html' Target=_Blank>External Web Link</a>
 

Rickharris

Senior Member
HI, Of course I don't mind - that was the piont of posting this here to share practical ideas for inspiration. let us know how you get on.
 

tarzan

Senior Member
picaxe@groups.msn.com
http://groups.msn.com/picaxe
http://groups.msn.com/picaxe/shoebox.msnw <A href='http://groups.msn.com/picaxe/shoebox.msnw' Target=_Blank>External Web Link</a>
 

Rickharris

Senior Member
this is an ongoing project that follows on from the LED messenger thread a while ago.

I found on the web a site about a bike converted to print a dot matrix message on the ground as it cycled along. this seemed like a fun thing to do (consider the environment and use water, or bread crumbs or as the original did chalk that will clean up easily)

The following code provided the dot matrix patterns for the capital letters A to Z - Letters are printed in a 5 x 5 pattern by selecting he binary pattern for each column of the letter. The code as is prints ABD repeatedly. In an 08 you can get 11 letters into 128 bytes.

Of course the 08 does not have 5 available outputs to provide the end effect so a larget Picaxe or 2 08s will be needed.

The end effect planned is a simple roller at the bottom of a container of whatever powder you want on the ground. When the drum rotates the powder is dispensed. 5 of these provide the dots. This is a simple mechanism and often used in the food industry to sprinkle flour or bread crumbs etc. onto products. If the roller is replaced with a round brush dipped in a liquid (say water) then the water flicks off the bristles onto the floor in the same way.


If you run this code, a debug after the lookup will shoe the changes to B1 for each letter, this can be used in a Pins command to turn the outputs on and off.
Code:

start:


' =================
' Max 11 chars - this prints ABC
'==================
for b2=0 to 29
lookup b2,(13,19,19,19,13,0,1,7,7,7,12,0,12,16,16,16,16,0,),b0
gosub ABC
next b2
goto start


ABC:
lookup b0,(%0000,%11111,%01111,%00111,%00011,%00001,%00101,%10101,%11001,%11101,%00100,%01010,%01110,%11110,%11100,%11000,%10001,%00010,%10110,%01001,%10010,%01000),b1
debug b0
return

Edited by - rickharris on 8/14/2005 10:52:30 AM
 
Top