Recent content by Garahbara

  1. G

    Picaxe 40M2 and variables using Blockly

    Hi all, Yes it's me of the model railway level crossing again. All is going well, and the boom gates go up and down using servo motors and lights flash and bell rings etc, all coded and working with a switch. However, I now need to detect the trains. Using LDRs. 13 of them. And I need...
  2. G

    Light Dependent Resistor (LDR) and LED lighting

    Hi all, Just a note that I've now been through all the train signals in the system, and put a 50V 4.7uf electrolytic capacitor across all the LDRs at each signal. All the signals now work just like bought ones. :geek: 😁 Exactly as they used to, and just as reliable. A fabulous quick and...
  3. G

    Picaxe 6 editor and 20m picaxe

    Can't really remember now. it was a while ago, and the code is on a laptop I haven't cranked up for years. But I had to do something like that, as well as a lot of "dynamic" reusable code. As well as some very inventive use of "interrupt". I'll have to dig it out and have a look at it again...
  4. G

    Picaxe 6 editor and 20m picaxe

    Yeah. Tell me about it! 😵 I had to do some pretty tricky code for that signalling system to get it to fit on the 20M, with about 2 bytes to spare. I'll be using a 40X2 for the main train detetction system for the level crossing with at least 12 LDRs connected. 3 tracks, bi directional...
  5. G

    Picaxe 6 editor and 20m picaxe

    Brilliant! Thanks for that. :geek: Not that I'm about to use them for anything, but the entire train signalling system (in my other thread) is built using them. "Those that think they know it all, annoy those of us that do" - me "If at first you don't succeed, use a larger hammer" - that...
  6. G

    Picaxe 6 editor and 20m picaxe

    Hi all, I found 5 M20 chips in my box of goodies today, On the chip it says PIC16F677. In the Picaxe 6 editor it identifies them as 20M. (Check PICAXE Type Connected) However try and program them, and it says chip not supported, and 20M is not on the PICAXE Type drop-down list. Is there...
  7. G

    AXE171 board and 2 servos

    I found this too. Even with SERVOPOS. When testing the boom gates raising/lowering logic, I put in a SERVO OFF (which stops the pulses), if the gates were up and no trains around. Was fine, next time a train arrived, I'd do a SERVO and get the pulses going again, then SERVOPOS to move the...
  8. G

    AXE171 board and 2 servos

    I just tested this again. And yes. You must issue a SERVO first (to get the 20ms pulses going), otherwise SERVPOS does nothing. SERVOPOS may very well alter the length of the pulses, but if the pulses ain't happening (because no SERVO was done first) then nothing happens.
  9. G

    AXE171 board and 2 servos

    Yep. I've sillyscoped the life outa the things using SERVO and SERVOPOS, and the 14M2 produces errant pulse lengths when using frequent SERVOPOS commands. Maybe 1, 2 or 3 every few thousand or so. Plugged the servos motors on, and when they "glitched" the pulse length from the 14M2 was...
  10. G

    AXE171 board and 2 servos

    OK guys, I think I can cross my theory about collision or overlap off the list and bin that one. I've tried with the sillyscope, and nup. No evidence. One pulse immediately follows the other, and it is extremely accurate. Exactly every 20ms between the pulses, and exact length of SERVPOS...
  11. G

    AXE171 board and 2 servos

    I see what you mean. However, If I'm using longer pulse length on the SERVOPOS, these longer length pulses will continue on BOTH pins regardless of whether I issue further SERVOPOS commands or not. With shorter pulse lengths occuring repeatedly, there may be less chance of "collision" (or...
  12. G

    AXE171 board and 2 servos

    I don't have any choice. I'm working with the AXE171 board. eg. B4 is hardwired on the board as the TX to the player. I note you are using the SERVO command, not SERVOPOS. SERVO resets the timer each time and restarts pulsing. Should you be using SERVO outside the loop first, then SERVOPOS...
  13. G

    AXE171 board and 2 servos

    hmmmm...... My understanding of the SERVOPOS (not the SERVO) command, is that the pulses must already be occuring every 20ms regardless. (started by the SERVO command). All the SERVOPOS command does is ALTER the pulse length, Not initiate or start the pulsing. I get the jitter whether...
  14. G

    AXE171 board and 2 servos

    This is the issue. I'd need to make each linkage point to the raising/lower boom gate extremely accurate from the pivot point of the boom gate, if I'm to drive both servos exactly the same. The scale models of the lights, gates and signs etc, do not provide the linkage point on the boom. Where...
  15. G

    Light Dependent Resistor (LDR) and LED lighting

    Sounds good. :) I've probably got too much time on my hands. I'll keep going and experimenting forever at this rate. Just that little bit more..... Just that little bit better. I've already re-written the code 4 times, cause "ahhhh.... that's a better way of doing it". :geek: I'm trying to...
Top