I need an ultra simple serial byte read without any interrupts or other Arduino baggage.
This works fine on other non-Arduino Mega328 boards but not with Arduino, at least using Serial Monitor.
Hitting 1 and send should turn on my debugger that is just a bunch of Serial.println() statements that monitor various program parameters.
Hitting any other key and send will kill the debug printout.
// includes and other functions not related are removed for this post - they work fine.
volatile bool debug= false;
Setup() {
Serial.begin(115200,SERIAL_8N1);
}
void loop()
{
if (UCSR0A & 0x80) { // check for a byte received
if (UDR0 == '1') { // if an ASCII 1
debug= true;
Serial.println("Debug ON, hit any key to turn off.");
}
else { // any 8 bit value
debug= false;
Serial.println("Debug OFF, hit 1 key to turn off.");
}
}
myloop() {
}
}
I ignored that, he prob typed it in laboriously to avoid that oh-so-simple "copy for forum" feature in the IDE; surely he compiled it before posting, after all...
The code is being developed on a secure computer with no internet or external storage devices allowed. USB sticks or any USB storage device is not recognized.
Wrong! USB devices can report what they are. All my development tools have no problems so far, TI MSP, Xilinx, Arduino, Microchip Studio. USB sticks and drives of any type are rejected.
I'm sure someone could hack something together but the average office user does not have that ability.
This is a very large company with deep pockets and major operations in California and Orlando - figure it out. This may be some plugin for Windows they had custom written. I don't know.
Maybe you have a TSR that rejects a few vendor IDs stuck in a port, but "secure" is - no BIOS (or whatever it is now) access, no "boot from external device" and more - making it a terminal that lets you use a network. It is not secure.
I'm telling you how the engineering computers are set up where I work.
It may not be secure to military standards but it's what they do here? I am not in the media creation group and I would not be surprised if they have tighter restrictions.
What difference does it make to you?
And no, we don't have BIOS or root access either! I also tried using a USB CDROM drive for the early 2000s. It rejected that as well so if they are storing manufacture IDs it must be a long list.
What answer. You last brought up the CR issue and I responded how I get around that. just offering more details. I thought this was a knowledge sharing and idea forum. Your hostility is not in line with that. I have always been courteous in my posts.
I'm going to look at more of yours. Perhaps the moderators should as well.