Hi All,
Can anyone help, I need to datatype that is at least 2^38 bits to be able to cope with RFID FDX_B tag serial number.
I though I found it by using unit64_t and including the sdtint.h library from avr, however it turn out to be only a long datatype. I have casted to int8_t for the purpose of printing to the terminal.
Here is my test sketch(edited Blink):
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
#include "stdint.h"
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
uint64_t time1= 4294967295; // this is a long type ie 32 bits long not 64!.
int8_t time2= 39;
// the setup routine runs once when you press reset:
void setup() {
Serial.begin(9600);
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
Serial.println(int8_t(time1));
Serial.println(time2);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Moderator edit:
</mark> <mark>[code]</mark> <mark>
</mark> <mark>[/code]</mark> <mark>
tags added.