![]() ![]() Serial.begin(115200) // initalize serial communication Long start // this variable holds the microseconds at the beginningīoolean prime // this variable indicates if the number that was tested is prime Long y // this variable will be the divisor that checks if the number is prime Long z = 1 // this variable will increment to indicate how many primes have been found Long x = 3 // this variable will contain the number to be tested The primes occuring after it up until 4,294,967,295. This program starts from the number 3 and prints all I set the serial communication at 115200 baud on a nano, which should work, although the only thing that comes to mind is that it has a different driver chip than most arduinos (CH340). ![]() ![]() My goal is for it to be as fast as possible, so I'm trying to make it simple to achieve maximum speed. I've written a sketch that is supposed to generate prime numbers using the modulo operator, but I'm having trouble with it printing anything to the serial monitor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |