!!

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: Arduino code required please  (Read 511 times)

0 Members and 1 Guest are viewing this topic.

Offline Firstone18

  • Trade Count: (0)
  • Newbie
  • **
  • N Gauge Society Number: 21472
  • Posts: 2
  • Country: gb
  • Gender: Male
    • Awards
Arduino code required please
« on: October 30, 2019, 03:51:29 PM »
 :helpneededsign:
I recently saw a YT video from Proto-Pic demonstrating a turntable controller using a Arduino and stepper motor. I have contacted Proto-Pic, and unfortunately the person who had the code no longer has it. Can anyone help with this please? If there is someone who can re-create, or even suggest a better code for TT control, please let me know. Thanks!

 :thankyousign:
have looked at all responses, and think I am now sorted.
thanks to all for you guidance.
« Last Edit: November 06, 2019, 12:24:46 PM by Firstone18, Reason: thank you to responders »

Offline Railwaygun

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • ****
  • N Gauge Society Number: 21889
  • Posts: 5429
  • Country: gb
  • Gender: Male
  • Keen on Military Rail, Kato Unitrack, & Z21/DCC
    • Railwaygun, Armoured train and Military Railway group
    • Awards
Re: Arduino code required please
« Reply #1 on: October 30, 2019, 04:28:05 PM »
Do a seaech on “Arduino turntable” on NGF  and you will find lots of info
This has been a public service announcement
It may contain alternative facts

Caveat lector

The largest Railwaygun, Armoured Train & Military Rail group in the world!
https://groups.io/g/railwaygun/topics

My Military Rail Pinterest area
https://uk.pinterest.com/NDRobotnik/

10mm / N armour Threads
https://www.10mm-wargaming.com/

Motto: Semper ubi, sub ubi

Offline NinOz

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: Ex3504
  • Posts: 810
  • Country: au
  • Gender: Male
    • Awards
To be called pompous and arrogant - hell of a come down.
I tried so hard to be snobbish and haughty.

| Carpe Jugulum |

Offline N_GaugeModeller

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 210
  • Country: 00
    • Awards
Re: Arduino code required please
« Reply #3 on: November 04, 2019, 08:42:53 AM »
I built this one

http://www.modeltraincatalogue.com/turntable2.html

It's quite a simple build with no sensors needed and used a remote control to move.

Seemed to work well, although I did eventually replace it with the MERG version which was better for my application needs.


Online Bealman

  • Moderator
  • Trade Count: (0)
  • Full Member
  • ****
  • N Gauge Society Number: 23151
  • Posts: 19215
  • Country: au
  • Gender: Male
  • Promotion remains in the future
    • Awards
Re: Arduino code required please
« Reply #4 on: November 04, 2019, 09:58:14 AM »
Yes, there are heaps out there.

Certainly no need to write your own code.

Do what most people do.... take an existing proven code and modify it to suit your own needs!
Vision over visibility. Bono, U2.

Online njee20

  • Trade Count: (+4)
  • Full Member
  • ***
  • N Gauge Society Number: 22598
  • Posts: 6669
  • Country: gb
    • Awards
Re: Arduino code required please
« Reply #5 on: November 04, 2019, 11:07:42 AM »
To be fair, that's exactly what he's doing, as asking for advice on that!

Google is awash with solutions, which I'm disinclined to wade through, I was drawn to the thread NinOz has linked to, looks pretty comprehensive, I imagine the sketch is in there somewhere!

Offline Vonzack

  • Trade Count: (+2)
  • Full Member
  • ***
  • N Gauge Society Number: 20933
  • Posts: 501
  • Country: gb
  • Gender: Male
    • Awards
Re: Arduino code required please
« Reply #6 on: November 04, 2019, 12:40:20 PM »
From memory it is, there are a couple of versions of it, but it's early on in the thread.

Offline jthjth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 121
  • Country: gb
    • Awards
Re: Arduino code required please
« Reply #7 on: November 04, 2019, 04:10:00 PM »
Not quite what you asked, but have a look here https://www.dccinterface.com/product/model-railway-premium-dcc-turntable-controller-kit-direct-mount/

I was about to go down the diy Arduino route, but this saved me all the effort. You get the source code as well. The kit works really well, and with the addition of a keypad it will work on DC as well as DCC. What I like about the approach in this kit is that all the information about the number of tracks, and their angles, is held in a simple text file on an SD card. You don't need to have any programming knowledge to set it up, just the ability to edit a text file.

 

Please Support Us!
June Goal: £100.00
Due Date: Jun 30
Total Receipts: £52.00
Below Goal: £48.00
Site Currency: GBP
52% 
June Donations

SimplePortal 2.3.5 © 2008-2012, SimplePortal