OK lets get this straight. Is it like this :-
Android --over air ---ASCII ---- BTooth BTooth ----- Z ------PIC16F84 PIC16F84 ----2bytes------FT639
What is Z protocol? You have that as expecting ASCII in the code.
OK lets get this straight. Is it like this :-
Android --over air ---ASCII ---- BTooth BTooth ----- Z ------PIC16F84 PIC16F84 ----2bytes------FT639
What is Z protocol? You have that as expecting ASCII in the code.
Rob.
The moment after you press "Post" is the moment you actually see the typso
Ah following it a bit better now.
I'm near your age and still learning PBP, usually by trial and error.
Try this and see if it works, SEROUT2 according to manual is same as BS2 serout
I'm probably completely wrong![]()
Rob.
The moment after you press "Post" is the moment you actually see the typso
Allan,
Search the net for MicroCode Studio Editor (MCS) it is free and will help tremendously.
Any code posted on forum will likely be raw. i.e. no code formatting unless it is written that way
so usually people copy the code into MCS which displays in formatted code.
The code tag is the # button on the posting panel.
Rob.
The moment after you press "Post" is the moment you actually see the typso
I am using MicroCode Studio Editor. That's where the example code was written in. I had to change the extensions on the 2 files. otherwise it would not let me upload them. The BasicStamp extension shoul be .bsp and the PIC code ext should be .pbp
I tried your code. Still not working. What I am having a hard time with is the code for the BasicStamp works 100%. The only changes I needed to make according to the PBP manual was the baud rate. The BasicStamp2p is faster than the BasicStamp2 and the baud rates in the PBP manual Appendix A are the same as the BasicStamp2 which is what I need for the PIC16F84 at 4Mhz. The other change was the move1 and move2 routines. PBP does not support nibble so I had to modify the code to send the apporpriate low and high bytes.
The Android APP has U D L R arrows plus a button in the center. When I press one of the arrow keys or the center button, it sends a Capital U D L R or C via Bluetooth to the HC-06 bluetooth module which sends it to the PIC. I then check what was sent and select which way to move the servos using the appropriate servo controller command bytes. The ASCII values are only used to tell which button was pressed. The values 122(z) 117(u) 85(U) 90(Z) and 103(g) are numeric values needed to send to the FT639 to intialize it. Once it it initialized then the protocol explained previously is used to position the servos.
Bookmarks