how do you add code for twilio after running the model on raspberry pi. Can we edit the code as a python file?
This tutorial will help you get started integrating your model with a Python project on RPi.
You can also use this tutorial as something to start with. After deployment you can edit the ‘proj.dir’/build/webserver-twilio.js file on your Raspberry to add / change whatever you want. That works fine for me.
i have seen this link but i am not sure how to add twilio details to my model. I am just getting used to this platform and providing me some steps to do this would be great
That is done as described in step 6 of the tutorial. Open a terminal window in your project directory and enter these commands:
6…Set your Twilio account token, secret key, the ‘from’ and ‘to’ numbers via:
$ export TWILIO_AUTH_TOKEN=3ce... $ export TWILIO_ACCOUNT_SID=AC305... $ export TWILIO_FROM=+162... $ export TWILIO_TO=+31624...
You will have to do this after each time you reboot the Raspberry. If that is inconvenient you can add your Twilio credentials in the bashrc file as described in the tutorial:
Note:* You can add the lines above to your
~/.bashrc file so they’re loaded automatically.
this came when running step 8:
pi@raspberrypi:~/example-linux-with-twilio $ npm run build
email@example.com build /home/pi/example-linux-with-twilio
tsc -p .
sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! firstname.lastname@example.org build:
tsc -p .
npm ERR! spawn ENOENT
npm ERR! Failed at the email@example.com build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-06-01T11_07_24_955Z-debug.log
From within your project dir:
$ npm update edge-impulse-linux
Then try step 8 again…
Issue has been duplicated here:
npm install in your project directory before
npm run build