Menu principale:
Dispositivo | Bus I2C | Indirizzo |
UPS HAT V1.1 | 1 | 0x36 |
RTC DS3231 | 1 | 0x68 |
MPU6050 | 3 | 0x68 |
sudo apt-get -y remove fake-hwclock
sudo update-rc.d -f fake-hwclock remove
sudo systemctl disable fake-hwclock
#if [ -e /run/systemd/system ] ; then# exit 0#fi#/sbin/hwclock --rtc=$dev --systz --badyear#/sbin/hwclock --rtc=$dev --systz
sudo hwclock -w
sudo hwclock -r
sudo hwclock -s
1. Eseguire nell'ordine i seguenti comandi:
sudo apt install apache2sudo apt install phpsudo apt install mariadb-serversudo mysql_secure_installation2. Nel file /etc/apache2/apache2.conf aggiungere la riga include /etc/phpmyadmin/apache.conf;sudo apt install phpmyadminsudo apt install python-mysqldb3. Da browser accedere a localhost/phpmyadmin con username e password impostati nella procedura di configurazione della piattaforma mySQL e creare il database.4. Aggiungere le tabelle al database:
create table today_time (activity int not null,
start datetime primary key,end datetime not null,
create table daily_activities (data date primary key,check(activity>=1 and activity<=8));
act1 time not null,act2 time not null,act3 time not null,act4 time not null,act5 time not null,act6 time not null,act7 time not null,act8 time not null);
create table battery_status ( voltage float, percentage int);