Étape 2: RaspberryPi programmation
- Changement du code (« your_plotly_username » et « your_apkey ») dépendent de vôtre *,
- Lancer le Module (sudo python basic-line.py),
- Après quelques minutes, vérifiez votre filewell sur Plotly, et vous verrez votre graphique de données !
import plotly.plotly as py py.sign_in('your_plotly_username', 'your_api_key')import plotly.graph_objs as gotrace0 = go.Scatter( x = [1, 2, 3, 4], y = [10, 15, 13, 17])trace1 = go.Scatter( x = [1, 2, 3, 4], y = [16, 5, 11, 9] )data = [trace0, trace1] plot_url = py.plot(data, filename='basic-line')
* Inscrivez-vous pour obtenir votre nom d’utilisateur, api_key et stream_token