Hi Andy,
To use the code tags go advanced and use the # icon.
A way forward is to use a bit pattern within a byte simply by indicating . as 0 and - as 1.
this would make S 000 or the whole...
Type: Posts; User: EarlyBird2; Keyword(s):
Hi Andy,
To use the code tags go advanced and use the # icon.
A way forward is to use a bit pattern within a byte simply by indicating . as 0 and - as 1.
this would make S 000 or the whole...
Have a go with gosubs as a start, we can progress to arrays later. I could write examples for you but I believe you will learn more doing it yourself. As always if you need help just ask.
With PBP3 you can create user commands so you could have
D: Dash: Dot: Dot
which is the only reason I asked.
With 3 there is arrayread and arraywrite which you could use in this example....
What PBP do you have?
The only reason is to learn as one never knows when or indeed if what one learns will be useful.
Create two subroutines one for dot and one for dash. Then in main D will be
Gosub Dash
Gosub...
I can make some suggestions for improvements if you want. Like use GOSUB. Bye the way as you use HIGH and LOW the tris is set automatically and you do not need to set it in your code. If you used...
There is nothing wrong with your code.
Except
morse:pause 3500
High led
pause 5000 'Led on for 5 seconds
D: high led 'dash