# IOT_device network settings:
## Setting the mask for Raspberry pi :(172.17.4.101/24)
remember to set the Mask to `255.255.255.0` => set the `IPv4` Address = `172.17.4.101/24`. If there are going to have multiple Raspberries, set the IP address to `172.17.4.10x/24`(x=2 , 3 , 4.....etc)
## Set the statistic Network :
### Facility :
step 1 : `cd /etc`
step 2 : `nano dhcpcd.conf `
step 3 : change the inform address to the address that specify above : `inform 172.17.4.101/24`
step 4 : `st
GOGOGOGOGOGOG changed 6 years agoView mode Like Bookmark
# vibration sensor and temperature sensor code backup:
```python=
from adxl345 import ADXL345
import time
import os
import paho.mqtt.client as mqtt
import threading
from scipy import pi
import matplotlib.pyplot as plt
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
sensoid= ['3b-0000001817de','3b-0000001817d1']
global temp_sensor
global temperature
temperature=[0,0]
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
client.subscribe("I
GOGOGOGOGOGOG changed 6 years agoView mode Like Bookmark
# Double I2C ADXL345 Code back up :
## adxl345:
```python=
# ADXL345 Python library for Raspberry Pi
#
# author: Jonathan Williamson
# license: BSD, see LICENSE.txt included in this package
#
# This is a Raspberry Pi Python implementation to help you get started with
# the Adafruit Triple Axis ADXL345 breakout board:
# http://shop.pimoroni.com/products/adafruit-triple-axis-accelerometer
import struct
import smbus
from time import sleep
import Adafruit_GPIO.I2C as I2C
# select the correct
GOGOGOGOGOGOG changed 6 years agoView mode Like Bookmark