Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: code help - random list between bounds.

  1. #1
    Junior Member
    Join Date
    Nov 2018
    Location
    tassie
    Posts
    15

    code help - random list between bounds.

    Hope you are having a good day!

    Having some trouble coding here.
    I need to write a method which will return array of a constant "n" individual random numbers between bounds, positive integers 'a' and 'b', obviously n<b-a.
    I would like to seed it so i get random different random numbers each time.
    I recall something about prime numbers to do this, but could be very wrong about that.

    Could you please assist me?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,612
    What Teensy do you have? The T_3.5/3.6 have a built in hardware random number generator - there are posts on that - perhaps only in the Beta K66 thread for the T_3.6

  3. #3
    Junior Member
    Join Date
    Nov 2018
    Location
    tassie
    Posts
    15
    t 3.6
    i have checked the k66 manual but it incomprehensible. page 939.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,612
    Yeah - that's why I didn't mention the manual …

    I referred to the K66 thread :: K66-Beta-Test

    That is the post 8 summary where this appears :: manitou's RNG generation

    That should have something of a demo - and also keywords and register info for searches that should find other samples as needed ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •