!!

Not Registered?

Welcome!  Please register to view all of the new posts and forum boards - some of which are hidden to guests.  After registering and gaining 10 posts you will be able to sell and buy items on our N'porium.

If you have any problems registering, then please check your spam filter before emailing us.  Hotmail users seem to find their emails in the Junk folder.


Thanks for reading,
The NGF Staff.

Author Topic: Bealman meets Arduino!  (Read 11672 times)

0 Members and 1 Guest are viewing this topic.

Offline Bealman

  • Moderator
  • Trade Count: (0)
  • Full Member
  • ****
  • N Gauge Society Number: 23151
  • Posts: 19552
  • Country: au
  • Gender: Male
  • Promotion remains in the future
    • Awards
Re: Bealman meets Arduino!
« Reply #90 on: April 29, 2020, 03:08:59 AM »
Thanks again! I'm currently looking at it now. Having joined the Arduino forum, it's interesting that my query has had 477 views and 2 replies. Maybe they don't know either!  ;)

I can understand your idea better than the one I've got from the Arduino forum. I'll let you know how I get on, though to be honest, I can live with it the way it is. It's not a model railway project after all!!  ;D

Anyway, back to the IDE....
Vision over visibility. Bono, U2.

Offline Bealman

  • Moderator
  • Trade Count: (0)
  • Full Member
  • ****
  • N Gauge Society Number: 23151
  • Posts: 19552
  • Country: au
  • Gender: Male
  • Promotion remains in the future
    • Awards
Re: Bealman meets Arduino!
« Reply #91 on: April 29, 2020, 10:01:12 AM »
Well, after several hours bangin' me head off the desk and gannin' around in circles, I'm about ready to give up. (Sorry, when I get frustrated, I tend to lapse back into my native dialect  ;)).

I have tried your suggestions, themadhippy - although maybe not correctly - and I haven't tried inserting the serial monitor to see what values are being returned.

I've also tried the Arduino forum's suggested routines, and even combining the two!

I'm sure I'm just missing something really simple. all code compiles no problem, but the LED routine just will not run while the scroll routine is.



Oddly enough, I'm going to leave it as is. It's just an added flashy extra to provide a bit background lighting in the box. Three modules are overkill. As this pic shows, I have disconnected two:



So basically, at the end of each scroll cycle, the LEDs flash, and settle into a colour, remaining on that until the next cycle. That's fine.



Strangely, and I have no idea why, the LEDs are now not just displaying red, green and blue as in the code, they are now lighting up in all the colour mixes they are capable of... cyan, yellow, white, etc!!

I have absolutely no idea why this is happening, but I'm cool with it - in fact, it's going to look great!

However, I am still annoyed with myself for being beaten by this millis function, and I really cannot understand where this new colour pattern is coming from!

Still if it works.... DON'T FIX IT.  :beers:
Vision over visibility. Bono, U2.

Offline themadhippy

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 917
  • Country: gb
    • Awards
Re: Bealman meets Arduino!
« Reply #92 on: April 29, 2020, 06:17:45 PM »
Quote
and I really cannot understand where this new colour pattern is coming from!
maybe theres more time available so  the leds  are fading between colours instead of snapping
shame you cant get yer code working,ive had a quick look at the leds modules your using,there  a standard 74HC595 shift register,instead of using the library were your having to guestimate whats going on  you could try talking directly with them, https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/the-74hc595-shift-register should give you a start
« Last Edit: April 29, 2020, 06:42:27 PM by themadhippy »
Don't fart before your arse is ready

Offline Bealman

  • Moderator
  • Trade Count: (0)
  • Full Member
  • ****
  • N Gauge Society Number: 23151
  • Posts: 19552
  • Country: au
  • Gender: Male
  • Promotion remains in the future
    • Awards
Re: Bealman meets Arduino!
« Reply #93 on: April 29, 2020, 08:15:16 PM »
Thanks! I have two modules left over, so I can experiment with them.

I intend to put them on pyschobot 2 so he puts on a light show as he trundles around  ;)
Vision over visibility. Bono, U2.

 

Please Support Us!
July Goal: £60.00
Due Date: Jul 31
Total Receipts: £15.00
Below Goal: £45.00
Site Currency: GBP
25% 
July Donations

anything
SimplePortal 2.3.5 © 2008-2012, SimplePortal