cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Anonymous
Not applicable

Hello, 

   

I am working on a project and my team is trying to read a joystick input into a serial port.  Right now I am trying to convert the joystick game controller code to meet my needs.

   

A second question we have regards BLE versus standard Bluetooth.  Is it possible to use regular Bluetooth to connect to the PSoC?

   

Please let me know how this could be accomplished.  

0 Likes
1 Solution
Bob_Marlowe
Expert II

Welcome in the forum!

   

The expression

   

    X_Axis = SAR_ADC_GetResult16(0) *0xFF /0x7FF;                        /* Get ADC reading and store in variable X_Axis */

   

might not give the expected result due to overflow and intterpretation of 0xFF a positive or negative number. Write 0xFFu for unsigned.

   

You did not tell what errors you have got.

   

 

   

BLE is not compatible to "normal" Bluetooth.

   

 

   

Bob

View solution in original post

0 Likes
2 Replies
Bob_Marlowe
Expert II

Welcome in the forum!

   

The expression

   

    X_Axis = SAR_ADC_GetResult16(0) *0xFF /0x7FF;                        /* Get ADC reading and store in variable X_Axis */

   

might not give the expected result due to overflow and intterpretation of 0xFF a positive or negative number. Write 0xFFu for unsigned.

   

You did not tell what errors you have got.

   

 

   

BLE is not compatible to "normal" Bluetooth.

   

 

   

Bob

View solution in original post

0 Likes
rola_264706
Honored Contributor II

Here is a program that moves the time around the screen.  I think you can get an ideal about the Joystick from this program.  It will need to be up graded to the latest component revisions however.

0 Likes