Here a High Level Design of the SW, more detailed than the last one:
Thursday, June 19, 2014
Wednesday, June 18, 2014
PHP and SQLite3 installation
At the end I changed my mind and I'll go with SQLite3 instead of MySQL, copying what they do in Officine Arduino.
I have found this useful tutorial to install everything on the Yun, perfect for me.
I have found this useful tutorial to install everything on the Yun, perfect for me.
HLD of the used technologies
What follow is just a very high level design of the technologies we are going to use on Arduino's side:
In a nutshell, I'm going to use the 32U4 to access our hardware (sensors, RTC and relays) providing a set of simple read and write API to a Python script running on the AR9331 processor. It stores/retrieves info in/from a MySQL (or sqlite) database. A web server is responsible to communicate with the client and provide/change info stored into the DB via PhP scripts.
This way:
- the sketch will be very simple and 'light' and we shouldn't have any problem in uploading it into the small space provided by Yun;
- all the logic to manage the sensors and actuators will be implemented with python scripts;
- we will use the flexibility of a DB to store configurations, logs, sensors/actuators status and any other info we'd like to share with the rest fo the world;
- a light web server will make easier the design and development (and test) of the interface we will provide to the final user.
Also there is another important reason why I'm choosing a web server based on PHP/MySQL technology: it's a common technology used by a lot of platform providing web hosting for free. When (in the future) I will create a website to manage my Arduino, I will just need to move my PHP scripts and MySQL structures/data to the new host. Maybe it will not be so easy, but I assume I can reuse 90% of the code.
PHP and its configuration
I still can't see the bonjour service so I cannot upload sketch via Wifi from my Mac, but I keep configuring the Yun.
I've just added PHP5 following this original forum topic from Arduino Forum or this answer from Stackoverflow, it's the same:
- installing php5 and php5-cgi packages
- configure php.ini (doc_root)
- configure and restart uhttpd
Not sure why but this morning (after the Yun has been up and running all the night long) I needed to manually reset it (YUN RST button) because it wasn't able to access internet to download php5 package. The strange think was that the SSH connection with my MacBook was running and I was able to access the device through my browser (192.168.1.11), but the device itself was not able to ping the router (192.168.1.1) and consequently not able to ping/access internet websites.
I've just added PHP5 following this original forum topic from Arduino Forum or this answer from Stackoverflow, it's the same:
- installing php5 and php5-cgi packages
- configure php.ini (doc_root)
- configure and restart uhttpd
Not sure why but this morning (after the Yun has been up and running all the night long) I needed to manually reset it (YUN RST button) because it wasn't able to access internet to download php5 package. The strange think was that the SSH connection with my MacBook was running and I was able to access the device through my browser (192.168.1.11), but the device itself was not able to ping the router (192.168.1.1) and consequently not able to ping/access internet websites.
Tuesday, June 17, 2014
USB 3.0 issue
I wasted a lot of time understanding Arduino Yun has a lot of problem when connected to USB 3.0 port. This morning I connected the Yun to my Windows 7 laptop (a HP EliteBook 8460p) and the problems came...
I wasn't able to maintain a stable association between the device and the driver and I wasn't able to upload any sketch to the Yun using the IDE. Changed the port (USB 2.0) and now it seems the uploading process works and the driver is correctly associated with the device.
Unfortunatley I tried a lot of different solutions before understanding it was the USB and now I have to upgrade OpenWrt to the latest version and format the SD card again.
I wasn't able to maintain a stable association between the device and the driver and I wasn't able to upload any sketch to the Yun using the IDE. Changed the port (USB 2.0) and now it seems the uploading process works and the driver is correctly associated with the device.
Unfortunatley I tried a lot of different solutions before understanding it was the USB and now I have to upgrade OpenWrt to the latest version and format the SD card again.
Subscribe to:
Posts (Atom)

