• Well, you can use peek16 with the address of the port to read pins directly (you'd have to check the Microcontroller datasheet for the address).

    However, something like:

    var pins = [A15,A14,A13, .... A0];
    // note - define array of pins before use, so it's faster
    digitalRead(pins); 
    

    Actually works pretty fast - it's not as fast as the peek, but it's loads faster than calling the function 16 different times. So much so that you're unlikely to notice the speed difference between it and peek when calling it from JS.

About

Avatar for Gordon @Gordon started