Descripción Uno de los fallos (bajo mi punto de vista) de la Raspberry Pi es el no disponer de una forma limpia de apagar la placa sin interactuar con el terminal o con la interfaz gráfica del sistema operativo que tengamos instalado. Se echa de menos un botón de encendido/apagado como el de cualquier […]
In a previous tutorial, I showed how to send data to AskSensors IoT platform using the web browser. It was helpful especially for beginners and people don't have material in hand or don't work with electronics!
This made me thinking more about providing you different ways to communicate with AskSensors without using electronics. This instructable explains step-by-step how to conduct automated data sending to AskSensors using Node.js over HTTPS GET Requests.
Note for guys not familiar with Node.js:
We will type command-line instructions, so you need to be comfortable with or at least know how to start a command-line tool like the Windows Command Prompt, or the Git shell.
Npm makes it easy for JavaScript developers to share and reuse code, and makes it easy to update the code that you’re sharing. Later we will need npm to install an HTTPS package for HTTP secure communications with AskSensors.
So let's do it!
Teacher Notes
Teachers! Did you use this instructable in your classroom? Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Install Node.js and NPM
First thing’s first: You need to download Node.js. It’s free and available for Windows, MacOs and Linux (in my case I'm using Windows).
Run the installer, follow the prompts in the installer. Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings.
NPM is distributed with Node.js, which means that when you download Node.js, you automatically get npm installed on your computer.
Restart your computer. You will not be able to run Node.js until you restart your computer!
Step 2: Test the Node.js
To Make sure you have Node.js and NPM installed, we will run simple commands to see what version of each is installed and to run a simple test program:
Test Node.js: To confirm that you have Node.js installed, type this command in your terminal:
node -v
This should print a version number.
Test NPM: To check if you have NPM installed, you can run this command in your terminal:
npm -v
Create a test file and run it: A simple way to test that Node.js works is to create a JavaScript file: for example name it ask.js, and add the code below:
console.log('Hello AskSensors!');
Run the code: open your command line program, navigate to the folder where you save the file and type:
node ask.js
You should see " Hello AskSensors!", means all fine!
Now, you have the Node.js and NPM ready. By next we will create an AskSensors account..
Raspberry Pi is a series of credit card-sized single-board computer while SIM800L is available for GPRS and SMS message data remote transmission. Combining both of them we would be able to control different devices via GPRS data communication or Text messaging.
In this tutorial we will be using SIM800L SMS message data remote transmission mode to control three LED. We will be covering also how to setup serial communication for raspberry pi.
Raspberry Pi 3 compared to previous Raspberry pi behaves differently with regards to the UART interface on the GPIO header, that's why we need to enable it first.
Enabling UART with minimum core frequency:
pi@raspberrypi:~ $ sudo nano /boot/config.txt
Add this line to the bottom
# Enable UART
enable_uart=1
Disable Console
In case you would like to connect a HAT using the UART interface, it’s recommended to disable the console.
To disable the console, edit the following file as follows:
Para activar WinRar y evitar estos molestos mensajes crearemos un archivo de texto del siguiente modo:
Una vez abierto el archivo de texto pegaremos el siguiente código:
RAR registration data Federal Agency for Education 1000000 PC usage license UID=b621cca9a84bc5deffbf 6412612250ffbf533df6db2dfe8ccc3aae5362c06d54762105357d 5e3b1489e751c76bf6e0640001014be50a52303fed29664b074145 7e567d04159ad8defc3fb6edf32831fd1966f72c21c0c53c02fbbb 2f91cfca671d9c482b11b8ac3281cb21378e85606494da349941fa e9ee328f12dc73e90b6356b921fbfb8522d6562a6a4b97e8ef6c9f fb866be1e3826b5aa126a4d2bfe9336ad63003fc0e71c307fc2c60 64416495d4c55a0cc82d402110498da970812063934815d81470829275
A continuación accedemos al menú Archivo y clicamos sobre la opción Guardar como…
Seguidamente, en el campo Nombre escribimos rarreg.key. En el campo Tipo seleccionamos Todos los archivos y finalmente presionamos sobre el botón Guardar.
Una vez guardado el archivo lo cerramos y lo copiamos del siguiente modo:
Acto seguido iremos a la carpeta donde se instalamos WinRar. En mi caso la ruta es C:\Program Files\WinRAR. Una vez dentro de la carpeta pegaremos el archivo rarreg.key.
La próxima vez que arranquemos WinRar ya no aparecerá el mensaje de copia de evaluación.
De esta forma tan sencilla podremos instalar y activar WinRar de forma completamente segura.