-->
Page 1 of 1

gpio dont seem to work

PostPosted: Fri Jun 07, 2019 11:02 am
by drspastic
I am new to all this so maybe doing something stupid. I have basic installed on a D1 Mini and it's running fine. however when I come to read or write from the gpio nothing seems to happen.
I wrote a simple basic program that turns gpio pins on and then off.
the first thing I noticed is that the program kept exiting, which turned out to be everytime it went past gpio 5 or was it 6 I can't remember but it resets d1 Mini. I assume that the pin in question is connected to a reset so I changed my code to just change the state of the first few pins and the program seems to be running. debug shows the variables of the for next loops all changing correctly however my test meter on the actual gpio shows them to be static. Half of them stuck on and the other half are stuck off. I will do a follow-up post with the exact ins and outs. I only have this smartphone to work with currently so I can't connect to the internet and view the basic without changing ap

Re: gpio dont seem to work

PostPosted: Fri Jun 07, 2019 11:11 pm
by Mmiscool
There is a difference in the pin number between the labels on the wimos d1 board and the internal number from the chip manufacture.

You can reference the pin numbers that are printed on the board by using the "D" numbers.
Code: Select allio(po,D5,1)

and
Code: Select allio(po,14,1)

will both be functionally identical. See attached image for pin numbers for chip pins vs board pins.


Re: gpio dont seem to work

PostPosted: Sat Jun 08, 2019 5:55 am
by drspastic
many many thanks!