Hi guys , is there away to use a variable for the pulsout command , or a way around the same
eg
time var word
one con 1000
time = one
pulsout GPIO.0,time
regards
sheldon
Printable View
Hi guys , is there away to use a variable for the pulsout command , or a way around the same
eg
time var word
one con 1000
time = one
pulsout GPIO.0,time
regards
sheldon
Hi, Sheldon
That's exactly what you do here ...
1) you first set a constant to 1000
2) you set a variable equal to this constant
3) you output signal of the variable length ...
so, step 1) is not necessary ...
writing
is the shortest way ... using a variable.Code:
Time VAR Word ; create your variable
Time = 1000 ; set it to 1000
PULSOUT pin, Time ; output your signal
Alain
cheers for that