I could setup a github project and have people help.
Basically the arudino api is specified here
http://wiring.org.co/reference
Their code is mostly here, but is specialized to the arduino board
https://github.com/arduino/Arduino/tree ... es/arduino
You take their same functions and wrap the esp8266 calls around them.
ie for working with pins / pullups you would do this kind of stuff.
I just got jcmvbkbc C++ compiler working (in ubuntu), so I can start doing C++ stuff.
Wish I could get it working on mac.....
Most of arduino's api is in C++.
IE the arduinos serial port is all c++.
I have a 4mb flash on my esp8266 which is a bit bigger than most others.
Some examples of wrapping the esp basic api calls to the arduino code.
void pullup(int inpin)
{
PIN_PULLUP_EN(inpin);
}
void noPullup(int inpin)
{
PIN_PULLUP_DIS(inpin);
}
void pinMode(int pin, int value)
{
// Set GPIO12 as input, then gpio_output_set (0, 0, 0, BIT12).
if(value == INPUT)
{
GPIO_DIS_OUTPUT(pin);
}
else{
GPIO_OUTPUT_SET(pin,0);
}
}
void digitalWrite(int outpin, int val)
{
GPIO_OUTPUT_SET(outpin,val & 0x1);
}
int digitalRead(int pin)
{
return GPIO_INPUT_GET(pin);
}