GPIO NONSDK Only certain pin's become output.

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

GPIO NONSDK Only certain pin's become output.

Postby AgentSmithers » Sat Apr 01, 2017 1:38 am

Hi Everyone, I am using the D1 Wemos Mini, I put the function below on a 5-second timer to toggle the pins back and forth, And use the 2nd chunk of code to in a nutshell display it on a webpage. But for some reason only PIN's 0,2(OnBoardLED),4,5 are toggling, The other 11 or so pins on the board are not. I'm sure I'm missing something in the SDK that perhaps reassign's pins to then become an OUTPUT?
Thank you everyone for your assistance with this matter.

Code: Select all

void some_timerfunc(void *arg)
{
int i = 0;
for(i=0;i<=31;i++)
{
if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & (1 << i))
{
gpio_output_set(0, (1 << i), 0, 0);
}
else
{
gpio_output_set((1 << i),0, 0, 0);
}
}
}



Code: Select all

for(a = 0; a <= 15; a++) {
//<tr>PinNumber</tr><tr>Value</tr>
   
os_sprintf(pinstatus, "<tr><td>%d</td><td>%d</td></tr>", a, GPIO_INPUT_GET(a));
strcat(pinvalues, pinstatus);
}

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Re: GPIO NONSDK Only certain pin's become output.

Postby AgentSmithers » Tue Apr 04, 2017 12:46 am

Hi everyone, After searching around a bit I found the answer here.
viewtopic.php?f=7&t=3115&p=10590&hilit=GPIO+set#p10590

Who is online

Users browsing this forum: No registered users and 60 guests