//ESP switch problems - set1
//4 - press any switch glow 7 th LED, delay 1 st LED (13-09-22)
void setup() {
// put your setup code here, to run once:
volatile long x,j,i;
volatile char *dirf,*dirk;
volatile char *outf,*ink;
dirf = 0x30; dirk = 0x107;
*dirf = 0x01; *dirk = 0x00;
outf = 0x31; ink = 0x106;
while(1)
{
x = *ink;
for(i=1;i<129;i=i*2)
{
if((x & i) == i)
{
*outf = 0x81;
}
else
{
*outf = 0x00;
}
}
}
}
void loop() {
// put your main code here, to run repeatedly:
}