Go to advanced search

by mike21724
Tue Nov 24, 2015 7:54 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

My adventure continues... Working great so far BTW. I have now built a RESTFul API that controls the train via the GertBot. My next question is about power. I need to pull more than the 2.5a from the track (closer to 5-6a). Reading the docs I was a little confused as there seems to be 2 options (one...
by mike21724
Sun Jul 26, 2015 3:34 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

hey Gert,

Thanks for the help. Did some hardware troubleshooting and after swapping the Pi it started working again, grrr...

Mike
by mike21724
Fri Jul 24, 2015 5:55 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

print ("ERROR STRING" , (gb.read_error_status(BOARD)))

returns -1
by mike21724
Fri Jul 24, 2015 5:23 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

Hey Gert, This was working and now it's stopped with a weird message: ('ERROR', 'Illegal error status code') ('MOTOR CONFIG ', []) Dumbed down the code to minimum and still failing. Not sure what the message means: ENB_ERR_IGNORE = 0x00 CMD_START_VAL = 0xA0 # Serial protocol start flag CMD_STOP_VAL ...
by mike21724
Mon Jul 06, 2015 5:51 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

I added the three missing globals and then used send_raw to transmit them. I still get the "Enable 1 was negated" message but the train moves. ENB_ERR_IGNORE = 0x00 CMD_START_VAL = 0xA0 # Serial protocol start flag CMD_STOP_VAL = 0x50 # Serial protocol end flag print("DCC test on board %d\n" % BOARD...
by mike21724
Fri Jul 03, 2015 2:55 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

Thanks, I'll test and let you know.

Mike
by mike21724
Thu Jul 02, 2015 10:12 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

Hi Gert - got it working sort of. Here's whats happening. Track is connected to channel 0 If I run the python code (below) - I get an error and nothing happens. ERROR Enable 0 was negated. Move the track to channel 1. ERROR Enable 1 was negated. However if I run the Raspbian gb_dcc GUI then the trai...
by mike21724
Thu Jul 02, 2015 5:38 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

Awesome thanks, I am familiar with those days. I reread the spec last night (that's a great way to get to sleep) and I think the critical point was that each thing that you want the train to do is a separate packet. So turn light on and go x speed are different packets. The way the spec is written, ...
by mike21724
Wed Jul 01, 2015 3:07 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Re: Gertbot DCC Python example

I'm trying to do DCC. Used the rover to get some basics stuff going (UART etc) but now I'm up to trying to send it a DCC command and I'm not sure of the structure.
Do we send preamble, the DCC decoder address is included in the data packet etc...

Thanks
Mike
by mike21724
Tue Jun 30, 2015 11:08 pm
Forum: HATs and other add-ons
Topic: Gertbot DCC Python example
Replies: 15
Views: 2562

Gertbot DCC Python example

Very nice unit - but I am having a major mental blockage on getting it working utilizing the Python library provided. Has anyone got the basics going using pure Python? Forward, back etc, once I have that I will work the rest out.

Thanks

Go to advanced search