Re: GPIO sampling speed?
Posted: Thu Feb 05, 2015 12:22 am
Have we been able to keep the ESP8266 at 160Mhz constant or does it still fall back to 80Mhz due to some binary blob call?
Richard.
Richard.
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
admin wrote:Have we been able to keep the ESP8266 at 160Mhz constant or does it still fall back to 80Mhz due to some binary blob call? Richard.
Fr4gg0r wrote:Wow, 4x times the speed.
Someone should port the interpreter from nodelua.
Can you also check how much free heap there is in nodelua?
do
local mode, write, OUTPUT = gpio.mode, gpio.write, gpio.OUTPUT
mode(2, OUTPUT)
for i = 1,10 do
write(2, 1)
write(2, 0)
end
end
static int lgpio_write( lua_State* L )
{
unsigned level;
unsigned pin;
pin = luaL_checkinteger( L, 1 );
//MOD_CHECK_ID( gpio, pin );
level = luaL_checkinteger( L, 2 );
level = level & 0x1; //remove conditional branching
//if ( level!=HIGH && level!=LOW )
// return luaL_error( L, "wrong arg type" );
int success = platform_gpio_write(pin, level);
//CHECK_GPIO_SUCCESS(pin, success);
return 0;
}