eadf / esp8266_easygpio Goto Github PK
View Code? Open in Web Editor NEWAn easy way of setting up esp8266 GPIO pins
License: GNU General Public License v3.0
An easy way of setting up esp8266 GPIO pins
License: GNU General Public License v3.0
This is not an issue but I haven't found a way to send you a PM.
I wanted to let you know that I've started to port my hardware abstraction tool to the ESP. It is called HWA and you'll find it here on Github (https://github.com/duparq/hwa). I am just at the beginning with ESP but a few Atmel AVRs are almost fully implemented and there are examples to show how easy it makes things. Comments and suggestions welcome.
Regards.
I'm adapting to run in noduino -sdk version. My problem is not having the libeasygpio.a . Where can I download or generate .
I don't know if this will solve the bug you describe in the comment (haven't tried it) but it looks like there might be a typo in the implementation of easygpio_inputGet on line 301: https://github.com/eadf/esp8266_easygpio/blob/master/easygpio.c#L301
// this does *not* work, maybe GPIO_IN_ADDRESS is the wrong address
return ((GPIO_REG_READ(GPIO_IN_ADDRESS) > gpio_pin) & 1UL);
Shouldn't that >
be a >>
instead?
How do I add a interrupt to GPIO 0
This seems not to work. Not sure if I need easygpio_pinMode
before easygpio_attachInterrupt
? I thought I might have forgotten some init function or similar, but I can not find any reference to it. What is wrong?
#include "osapi.h"
#include "easygpio.h"
int interruptOne = 42;
static void sonoffBtnInterrupt(void* arg) {
uint8_t value = easygpio_inputGet(13);
easygpio_outputSet(13, !value);
}
void ICACHE_FLASH_ATTR user_init() {
easygpio_pinMode(13, EASYGPIO_PULLUP, EASYGPIO_OUTPUT);
easygpio_outputSet(13, 0); // turn on
//easygpio_pinMode(0, EASYGPIO_PULLUP, EASYGPIO_INPUT);
bool success = easygpio_attachInterrupt(0, EASYGPIO_PULLUP, sonoffBtnInterrupt, &interruptOne);
os_printf("easygpio_attachInterrupt success: %d\r\n", success);
}
Thanks in advance!
I might be wrong but I THINK that open-drain settings are missing here. I note in the i2c example - they set the outputs as open drain like this..
//Set SCK as open drain
GPIO_REG_WRITE(
GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_SCK_PIN)),
GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_SCK_PIN))) |
GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE)
);
What is the real license of this code? In the root directory it is GPL but in your individual c files it appears to be BSD 3-clause license
The title says it all. Any plans to fix it?
How many GPIOs can I use with the ESP-07 or ESP-12? (not including ADC)
GPIO 15 is tied to ground and GPIO 0 is... well I hope that I can leave it.
Thanks
maybe I`m dumb but how can I set a gpio high?
I use this to specify which gpio pin i want and that the pin should be an output:
uint8_t gpio_pin = 0;
EasyGPIO_PinMode pinMode = EASYGPIO_OUTPUT;
But how can i set the level of the gpio to high or low now?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.