On a Arduino mega
Whenever I configure PORTB's available bits i.e bits 7-4 (3-0 used in spi) as inputs, my code deadlocks at if(client.connect) found in the example web client or the playground's SurferTim's email client
Below the code
DDRB&=0x0f; // set pin portB 4-7 as input, leave other untouched
Yet, the dhcp client and the ntp client works perfectly well with these bits as input
And curiously, with a simplified version exhibiting the very problem, the if statement exits with failure instead of deadlock
Any idea?
Whole day wasted on this
Thanks in advance
