Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include "ST25DVSensor.h" #define SerialPort Serial #if defined(ARDUINO_B_L4S5I_IOT01A) // Pin definitions for board B-L4S5I_IOT01A #define GPO_PIN PE4 #define LPD_PIN PE2 #define SDA_PIN PB11 #define SCL_PIN PB10 #define WireNFC MyWire TwoWire MyWire(SDA_PIN, SCL_PIN); ST25DV st25dv(12, -1, &MyWire); #else #define DEV_I2C Wire ST25DV st25dv(12, -1, &DEV_I2C); #endif void clearNFCMemory() { //ok so one issue was that the buffer was not being cleared before writing new data to the tag. st25dv.writeURI("", "", ""); // Write empty data to clear the memory } char *a[]= { "C.pdf", "P.pdf", "B.pdf", "L.pdf", "A.pdf" }; /* There is of course a solution that beats this, by loading a single actual webpage that handles getting random docs. just let the arduino monitor N reads and Energy. Would save a bunch of over head. */ void setup() { // SerialPort.begin(115200); st25dv.begin(); clearNFCMemory(); // delay(1000); } void loop() { String urlBase = "10.1.0.250/"; for (int i = 0; i < 5; i++) { String completeURL = urlBase + a[i]; // Combine base and filename char uriBuffer[128]; completeURL.toCharArray(uriBuffer, sizeof(uriBuffer)); st25dv.writeURI(String(uriBuffer),"", ""); // Write the URI delay(10000); // 10-sec delay clearNFCMemory(); } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)