Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code: DatasetGenerationError
Exception: IndexError
Message: list index out of range
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
original_shard_lengths[original_shard_id] += len(table)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1343, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 907, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
text string |
|---|
// ============================================================ |
// BLE CLIENT (Transmitter) — TSIM7000G / ESP32 |
// - Scans for server advertising the matching SERVICE_UUID |
// - Connects, waits 5s, then sends character 'D' every 10s |
// - LED on PIN 12 stays HIGH permanently as power indicator |
// - No Serial output, no GPIO toggling during transmission |
// - Write without response = single burst (higher current peak) |
// ============================================================ |
#include <BLEDevice.h> |
#include <BLEUtils.h> |
#include <BLEScan.h> |
#include <BLEAdvertisedDevice.h> |
// Must match exactly the server's UUIDs |
#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b" |
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8" |
#define LED_PIN 12 // Permanent ON indicator — set HIGH once, never toggled |
#define SEND_INTERVAL_MS 10000UL // Transmit 'D' every 10 seconds |
BLEScan* pBLEScan = nullptr; |
BLEClient* pClient = nullptr; |
BLEAddress* pServerAddress = nullptr; // Stores server address once found during scan |
bool connected = false; |
unsigned long lastSendTime = 0; |
// ---- Scan Callback ---- |
// Called for every BLE device found during scan. |
// Stops scan immediately when the target server is identified by its SERVICE_UUID. |
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks { |
void onResult(BLEAdvertisedDevice device) { |
if (device.isAdvertisingService(BLEUUID(SERVICE_UUID))) { |
pBLEScan->stop(); // Stop scanning — server found |
if (pServerAddress) delete pServerAddress; |
pServerAddress = new BLEAddress(device.getAddress()); |
} |
} |
}; |
void setup() { |
// PIN 12 — permanent power/status indicator, never switched off |
pinMode(LED_PIN, OUTPUT); |
digitalWrite(LED_PIN, LOW); |
// Initialize BLE with device name "TX" |
BLEDevice::init("TX"); |
// Set maximum TX power (+0 dBm) for strongest magnetic field signature |
BLEDevice::setPower(ESP_PWR_LVL_N0); |
// Configure scanner with callback and active scan mode |
pBLEScan = BLEDevice::getScan(); |
pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); |
pBLEScan->setActiveScan(true); // Active scan requests extra info from advertisers |
} |
void loop() { |
// ---- NOT CONNECTED: scan and attempt to connect ---- |
if (!connected) { |
// Scan for 3 seconds — callback fires if server is found |
pBLEScan->start(3); |
pBLEScan->clearResults(); |
if (pServerAddress) { |
pClient = BLEDevice::createClient(); |
if (pClient->connect(*pServerAddress)) { |
connected = true; |
// 5-second grace period after connection before first transmission |
delay(5000); |
lastSendTime = millis(); |
} else { |
// Connection attempt failed — clean up and retry on next loop |
delete pClient; |
pClient = nullptr; |
} |
} |
// ---- CONNECTED: send 'D' every 10 seconds ---- |
} else { |
if (millis() - lastSendTime >= SEND_INTERVAL_MS) { |
// Retrieve service and characteristic from connected server |
BLERemoteService* pSvc = pClient->getService(SERVICE_UUID); |
BLERemoteCharacteristic* pChar = pSvc ? pSvc->getCharacteristic(CHARACTERISTIC_UUID) : nullptr; |
if (pChar && pChar->canWrite()) { |
// Write without response — single directional burst, no ACK exchange |
// This produces a sharp, clean current spike visible on the magnetic sensor |
pChar->writeValue("D", 1); |
lastSendTime = millis(); |
} else { |
// Characteristic not reachable — server likely disconnected |
End of preview.
No dataset card yet
- Downloads last month
- 1,301