-->
Page 1 of 1

porting an arduino project

PostPosted: Mon Jul 13, 2015 11:45 am
by hunnimonstr
Hi

I am very new to this platform, and may be asking too much?? I have a small arduino project that uses a 433mhz Rf Rx board to listen for messages broadcasted using the fine offset weather station protocol, and logs the timestamped info to SD. rather than add an esp8266 to the project it seems neater to use the esp8266 instead of the arduino,

my arduino project uses the following libraries
#include <Wire.h>
#include "RTClib.h" ds1307 rtc library.
#include <SPI.h>
#include <SD.h>
#include <WeatherSensorWH2.h>

the WeatherSensor WH2.h lib references arduino.h also..

are these esp8266 compatible??

So far i have simply tried copying the code into a new ide project and selected the target an esp8266-12, and attempted a compile.

It fell over on the first line of code after the #includes and #defines
a timer interupt

ISR(TIMER_COMPA_vect) {....}

i could use a pointer as to where to start reading up on the esp8266 timers available if possible so i can emulate the arduino timer on the esp board..


thanks in advance..

Re: porting an arduino project

PostPosted: Tue Jul 14, 2015 1:57 am
by tytower
I would start at the readme in Github/ESP8266/Arduino for some basics then refer to the wiki on this page above you. Then alter your code to reflect an ESP if needed . The transmit / receive sections would probably be different. When compiling and putting your code on the ESP the ESP board must be selected in the Arduino IDE .