Let's Make Robots!

Programming led (picaxe-28)

Hi people, i speak little english, sorry. Ok i need help ! i programming my first robot and 1 Led . OK I need the help! I schedule(program) my first robot and 1 led.I do not find Tutoriel to install(settle) Led, I placed my Led on digital outputs (both branch on out 7). My led ignites correctly but when I want scheduled(programmed) I return codes is that do not walk(work): led:

High 7 ' switch one output 1

pauses 5000 ' wait 5 second

low 7 ' switch off output 1

pause 5000 ‘ wait 5 seconds

goto main ‘ loop back to start

 

 Thank you very much for your help !

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

ok thank you i go test your proposition thank you for "no flea but chip" ^^

Yes I use the flea L293D! Otherwise when I place the code that you gave me, the LED always makes the same thing, I shall want to make him different blinking when the robot detects an obstacle and When I place the code that makes me an error: hand:
^
 [7955]

Well here is the problem:

- your LED is conected to pin 7, pin 7 is also being used by the l293d, so everytime your motor gets a comand it turns the LED on.

If you want to give seperate comands to your LED you need to hook it on a different pin. Pin 4,5,6,7 are used by the L293d so you can only use 0,1,2,3.

Puce ne se traduit pas directement pas flea, en anglais c'est "chip".    

tu utilise la puce L293D pour faire tourner des moteur?

Try some code like this:

Main:

pause 1000

high 7

pause 1000

low 7

goto main

led.jpgledt.jpgMy Led is placed well or not because it ignites but I do not arrive has to schedule her! You can give me an example of code to schedule my Led . Thank you

Salut Ivan,

I can only answer you in English (or Dutch). Let's see if this helps.

Your program has no label in it. The first line should be 

main:

The goto command in the last line refers to this label. But your program has none. Therefor "goto" does not know where to go to.

 

if you want i could translate to french