PiEasy - porting ESPEasy to Raspberry Pi (Zero)

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Forum rules
You have entered the experimental forum, beware!!!
Post Reply
Message
Author
User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#1 Post by moelski » 18 Dec 2016, 16:17

Hi @all,

some days ago I found this awesome book from Neil Kolban:
https://leanpub.com/pi
I was really impressed about the huge amount of information he gave to us. For everyone who is interessted in the Pi this is a must to read 8-)

And at some point I stumbled about a project introduced by me-no-dev which is called "RasPiArduino":
https://github.com/me-no-dev/RasPiArduino

I get interested in that stuff and realized that you get a whole framework to program a Raspberry Pi from the Arduino IDE.
My first thought was ... "Why should I use the Arduino IDE to write C(++) code for the Pi :roll: ". But after a while the fog cleared and I started testing :D

The first test was to compile a blinky program. Works :shock:
The second test was a PCF8591 AD converter .. And after some trouble with sending the correct bytes to the device, it works, too :shock:
Next test was to check if we can access files on the filesystem (keep in mind ... from a Arduino sketch) ... works :shock:
Last but not least there was a network check ... works :shock:

Then I asked myself ... What will happen if I try to compile ESPEsay :roll: And well there where a hugh amount of errors.
But most of them could be fixed or bypassed. And after about 10 hours of coding it was done. ESPEasy is running on a Raspberry Pi Zero.

Now you may ask ... WHY the hell are you doing this :mrgreen:
First of all ... It´s fun and I learned a lot new things.
And I think there are some other benefits ...
* The Pi Zero costs about 5$ ... It´s a little bit bigger than a NodeMCU ESP ... But has a lot more power.
* You have a full accessible Linux system as base ... No bare metal like on the ESP8266
* You have native LAN / WLAN support
* There is a lot of space on the SD card for data handling / storage. And you can even use your network and access a NAS for example ...
* The PI has more GPIO´s than the ESP8266 (ok this meight change with the upcomping ESP32)
* Simple more processing Power
* You can run ESPEasy as a simple application on any running Raspian System
* You can Debug the Code 8-)
* as more as I`m thinking about I got more and more pros for this config :ugeek:

Ok that´s all for now. If you are interested in more details I can make a video with the compilation process and how it runs all together ...
And it would be possible to share my code on Github.

Would be nice to get some feedback on this stuff. And have a nice christmas and a happy new year.

Dominik
Attachments
Running the binary PiEasy on a Raspberry Pi Zero
Running the binary PiEasy on a Raspberry Pi Zero
PiEasy01.PNG (13.2 KiB) Viewed 7868 times
HTOP with the process running ...
HTOP with the process running ...
PiEasy02.PNG (65.57 KiB) Viewed 7868 times
Pi with running PiEasy serving his webpage to a Chromium browser which also runs on the Pi :-)
Pi with running PiEasy serving his webpage to a Chromium browser which also runs on the Pi :-)
PiEasy03.PNG (39.56 KiB) Viewed 7868 times
regards
Dominik

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#2 Post by r_255 » 18 Dec 2016, 17:52

Omg, espeasy is going PI :D
I love all these flavours of espeasy, i am going to order myself a pizero and have a look.

Today i copy and paste coded my 1st .ino file ever and that took me about 10hrs, so respect.... !

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#3 Post by papperone » 18 Dec 2016, 19:11

That's brilliant idea!!
I've still some PiZero bought at 0.99$ from Microcenter somewhere and now I believe I've foudn how to use them for more fun!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

ILoveIOT
Normal user
Posts: 44
Joined: 01 Nov 2015, 10:54

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#4 Post by ILoveIOT » 19 Dec 2016, 02:36

Yep,...that's a very brilliant idea !! Maybe this could also work on the Orange PI family, they have also some nice flavors;

$12.63 - H2 - Wifi - 100MB LAN - 512Mb http://www.orangepi.org/orangepizero/
$13.63 - H3 - HDMI - 100MB LAN - 512Mb http://www.orangepi.org/orangepione/
$24.55 - H5 - HDMI - 1GB LAN - 1GB http://www.orangepi.org/orangepipc2/

If this is working with the GPIO's on a Rasberry I can test it on a Orange PI PC, should be compatible.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#5 Post by moelski » 19 Dec 2016, 12:19

Hi !
PiZero bought at 0.99$
WOW :shock: Do you have a link for that ?
Maybe this could also work on the Orange PI family
I think this will not work out of the box .... OrangePi and Reasperry Pi using different cores.
And the RasPiArduino has a lot constants / definitions which refer directly to the BCM2835 Chip.

To get this running you need to enhance / or rewrite some of the RasPiArduino files which are relatet to the BCM2835 core.
Then it would work ... But it´s not as easy as it meight sound ... :roll:

And I should mention that there are still some little problems ...
* Task Load is to high for the process. I think that´s because of the delay(1) in the main loop ...
* File Read from the Webserver did not work correctly ...
But that can all be fixed sooner or later ;)

Dominik
regards
Dominik

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#6 Post by papperone » 19 Dec 2016, 14:20

moelski wrote:Hi !
PiZero bought at 0.99$
WOW :shock: Do you have a link for that ?

Dominik
That was available a while ago only in the physical store and limited to one per customer.
I was by chance in USA for a business trip so every day I was goign to the Microstore shop to buy one, I ended up with four of them!!
I think that campaing is over as it seems they don't have currently any stock :(

EDIT: sorry I checked better and they still have some for 5$ (which is still a very good price) but indeed only if you live in US (or travel to!) and you can go to one of their shop who still has stock...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

NightBird
Normal user
Posts: 24
Joined: 02 Dec 2016, 17:54

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#7 Post by NightBird » 19 Dec 2016, 17:51

Hi,
Ok that´s all for now. If you are interested in more details I can make a video with the compilation process and how it runs all together ...
And it would be possible to share my code on Github.
Yes, I'm very interested, if you share your code...
ESPEasy running on ESP-12F self-made modules (with various sensors) and talking to Domoticz (hosted on RPi2)

ILoveIOT
Normal user
Posts: 44
Joined: 01 Nov 2015, 10:54

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#8 Post by ILoveIOT » 20 Dec 2016, 14:57

I think this will not work out of the box .... OrangePi and Reasperry Pi using different cores.
And the RasPiArduino has a lot constants / definitions which refer directly to the BCM2835 Chip.
Lol,..damm,..one dream less ;-)

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#9 Post by moelski » 11 Jan 2017, 07:53

Hi everybody.

I decided to not longer spend time on this PiEasy port.
There are to many problems left and the overall performance of the resulting code is to bad.
I think on a Raspberry you can handle the things better with threads instead of timer.
And I definitely need serial (and maybe USB) inputs.

Since I need to control my power meter in the base I will write a new application.
The basics will be used from EspEasy.

If I have any news I will post a note here.

Dominik
regards
Dominik

ILoveIOT
Normal user
Posts: 44
Joined: 01 Nov 2015, 10:54

Re: PiEasy - porting ESPEasy to Raspberry Pi (Zero)

#10 Post by ILoveIOT » 22 Jan 2017, 00:38

Why not an easy esp look, for the front end, and simple scripts or programs at the backend ?

Then we would had an easy config webbased tool, for switching, temp, etc on a PI, would be nice to be compatible for the Rasbarry and Orange PI's.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests