Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Accelerometer, Compass and Distance Sensor Project - HELP

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Accelerometer, Compass and Distance Sensor Project - HELP
Moderator:
RKRM

Post Reply
Follow this topic



Accelerometer, Compass and Distance Sensor Project - HELP

rcmarques posted on 13 Jul 2012 5:40 PM PST
Member
8 Forum Posts

 Hello Everyone,

I'm trying to learn about PSoC 3, and I want to show in the LCD the values measured of the accelerometer, compass and distance sensor.

Both distance sensor and compass have digital outputs.

I've been searching in the internet and found this project done (http://www.planetpsoc.com/psoc1-projects-analog/22-measure-multiple-analog-inputs-using-analog-mux-bus.html), although I can't compile it because there are an error I don't know how o solve.

Please, can anyone help me?

 

 

 

The accelerometer has 2 outputs(X and Y) and it's analog.




Re: Accelerometer, Compass and Distance Sensor Project - HELP

danaaknight posted on 13 Jul 2012 06:21 PM PST
Top Contributor
1773 Forum Posts

I compiled under Imagcraft, Designer 5.2, compiled fine with one minor

warning.

 

Note I was asked to update 2 modules and I gave it permission, update

was successful.

 

Regards, Dana.



Re: Accelerometer, Compass and Distance Sensor Project - HELP

danaaknight posted on 13 Jul 2012 06:24 PM PST
Top Contributor
1773 Forum Posts

Note, this was a PSOC 1 design by the way. So compile and IDE was

Designer, not Creator (PSOC 3/5).

 

Project was analog mux buss for multiple sensors.

 

Regards, Dana.



Re: Accelerometer, Compass and Distance Sensor Project - HELP

rcmarques posted on 13 Jul 2012 07:09 PM PST
Member
8 Forum Posts

 Thanks Dana.

I need a PSoC 3 project any suggestion?

 



Re: Accelerometer, Compass and Distance Sensor Project - HELP

rcmarques posted on 13 Jul 2012 07:12 PM PST
Member
8 Forum Posts

 I had done the project attached, but It's not working, can you take a look?

 



Re: Accelerometer, Compass and Distance Sensor Project - HELP

rcmarques posted on 13 Jul 2012 07:15 PM PST
Member
8 Forum Posts

 Sorry, attached now.

The project for the accelerometer.



Re: Accelerometer, Compass and Distance Sensor Project - HELP

rcmarques posted on 13 Jul 2012 07:18 PM PST
Member
8 Forum Posts

 I couldn't attach a file...

My project, with accelerometer, has two inputs->Analog Mux->ADC DelSig->LCD.
Following my code, please take a look:

*/

#include <device.h>

#include <stdio.h>

#include <stdlib.h>

#define TAM 16

void main(){

uint8 mux=0;

char8 buffer[2][TAM];

Multiplex_Start();

Multiplex_Init();

ADC_Start();

LCD_Start();

    ADC_StartConvert();

LCD_Position(0, 0);

LCD_PrintString("Acelerometro");

while(1){

mux=!mux;

if(ADC_IsEndConversion(ADC_WAIT_FOR_RESULT)){

sprintf((char *)buffer[mux],"%f",ADC_GetResult16());

LCD_Position(1, 0);

LCD_PrintString(buffer[0]);

LCD_Position(1, 8);

LCD_PrintString(buffer[1]);

        }

}

}



Re: Accelerometer, Compass and Distance Sensor Project - HELP

sachinbvp posted on 13 Jul 2012 09:21 PM PST
Top Contributor
139 Forum Posts

 @rcmarques for accelerometer project u can refer  to sample projects that comes with the psoc guide and in psoc creator 



Re: Accelerometer, Compass and Distance Sensor Project - HELP

Bob Marlowe posted on 14 Jul 2012 01:09 AM PST
Top Contributor
1768 Forum Posts

The PSoC5 FirstTouch kit (-14) has in its example projects some which use the on-board accelerometer. The switch from PSoC5 to PSoC 3 is rather easy. I suggest to download the project-files from here http://www.cypress.com/?rID=43674 

 

Bob



Re: Accelerometer, Compass and Distance Sensor Project - HELP

rcmarques posted on 14 Jul 2012 03:48 PM PST
Member
8 Forum Posts

 Thanks guys!



Re: Accelerometer, Compass and Distance Sensor Project - HELP

Bob Marlowe posted on 15 Jul 2012 01:34 AM PST
Top Contributor
1768 Forum Posts

You are always welcome!

 

Bob



Re: Accelerometer, Compass and Distance Sensor Project - HELP

sachinbvp posted on 25 Jul 2012 01:23 AM PST
Top Contributor
139 Forum Posts

@bob i think PSoC 5 First touch starter kit is now obselete according to cypress website so go for PSoC 003 first touch starter kit and develop projects on it



Re: Accelerometer, Compass and Distance Sensor Project - HELP

Bob Marlowe posted on 25 Jul 2012 04:04 AM PST
Top Contributor
1768 Forum Posts

As a real "Start" the FirstTouch modules come in very handy. But they go out (obsolete) quickly as well, undergoing re-designs and whatever else.

To constantly beeing on the developer's side I would recommend a -001 or a -30 kit and providing the external hardware on a separate board connected to the kit. There is a Video from Dave van Ess (called "Pimp your Kit" one of the first PSoC Today episodes) which shows up how to improve a -30 kit, have a look at!

 

Bob



Re: Accelerometer, Compass and Distance Sensor Project - HELP

sachinbvp posted on 25 Jul 2012 07:28 AM PST
Top Contributor
139 Forum Posts

plz send me link for Pimp your kit webisode



Re: Accelerometer, Compass and Distance Sensor Project - HELP

Bob Marlowe posted on 25 Jul 2012 07:51 AM PST
Top Contributor
1768 Forum Posts

Here http://www.cypress.com/?rID=60521 is a list of all PSoC today Webisodes. Take the very first one.

 

Bob



Re: Accelerometer, Compass and Distance Sensor Project - HELP

danaaknight posted on 25 Jul 2012 03:28 PM PST
Top Contributor
1773 Forum Posts

PSOC 3 First Touch still an active product sold, and has the accelerometer on it.

 

Regards, Dana.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20