How do i use the NRFon event to set the contents of he NFC tag to be a URL?
The only think i did was this and it showed the output perfectly on the terminal when the phone was scanned.
NRF.on('NFCon', function() {
var currentTime = new Date();
var day = currentTime.getDate();
var month = currentTime.getMonth() + 1;
var year = currentTime.getFullYear();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
var formattedDate = padNumber(day) + '/' + padNumber(month) + '/' + year;
var formattedTime = padNumber(hours) + ':' + padNumber(minutes);
console.log("Student checked-in at: " + formattedDate + " " + formattedTime);
});
function padNumber(number){return (number < 10 ? '0': '') + number;}
If i set the contents of the NFC Tag to be a URL content, how would i display it on my webpage? please could you help, thank you.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon
How do i use the NRFon event to set the contents of he NFC tag to be a URL?
The only think i did was this and it showed the output perfectly on the terminal when the phone was scanned.
If i set the contents of the NFC Tag to be a URL content, how would i display it on my webpage? please could you help, thank you.