Could anyone help me with picaxe 08M programming?

Charleschen

New Member
Recently i am doing a project on bicycle speedometer and also show its distance....here are some details about the project:
1.Use a 4017 counter connected 10 Leds as my display( from Q0 to Q9)
2. use a hall effect sensor,,
3. the output of the sensor goes into a window comprotor.(In my case ,when the sensor detect the magnet, the output of the comprator goes from 5V to 0V..)
4.The output of the comprator goes into the pin3(ADC4)
5.Pin7(OUT0) OF picaxe goes into the pin14 (clock pulse) of the 4017..
6.pin6(OUT1/ADC1) of picaxe goes into the pin15(Master reset) of the 4017
7.there is a swith connected to pin5(OUT2/IN2/ADC2),When the switch is closed and being pressed, it (pin5)goes to logic low, so the distance is displayed..

Here are some details of the wheel:
1,the bicycle goes 2.1677 meters between every two pulses..(2.1677m every revolution).
2,the speed and distance should be displayed in km/hr and kw..
3, eg 13km should be displayed in the format: 1 led on, after 1 second 3 leds on...



I know it 's a really tough programming..but could anyone help me or give me some idea...thanks very very much...
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

All projects can look complicated when looked at as a whole, so the best way to view them ( and to develop them, IMO ) is to split them into separate parts or sub-modules ...

Determining the wheel's rotation rate
Calculating speed
Calculating required display information
Getting display information to the display

The first and last are hardware interfacing and can be done as separate projects first. Once you have those working you can combine them and then fill in the gaps. SERTXD will be useful for reporting information without a display, and the display can be tested by using dummy, pre-set, data or by including a test harness which cycles through data to be displayed.
 

westaust55

Moderator
Welcome.

You have posted this in the finished projects section:
PICAXE Forum > Finished User PICAXE Projects > User Projects - Communication

If the moderators do not move to the active forum area, you might like to repost yourself.

As hippy has mentioned, programming is not particularly hard once you set your mind to it.

Your description sugegsts that you already have a pre-defined project/scope to work to.

If you ask more specific questions and maybe with your code developed so far, others have a more specific topic to respond to.
 

manuka

Senior Member
Charleschen: This looks an interesting quest - is it for the Bright Sparks competition? All those LEDS may be a tad power hungry! Perhaps consider a 20M (which allows a direct 7 segment read out)?
 
Top