![]() ![]() CV 5 is the highest servo setting (typically 170 degrees) with CV 9 being the fastest backwards speed (Setting typically 10 degrees). Cv2 is the start servo setting(ie motor just running)(typically 95 degrees) forwards, and CV6 is the equivalent for backwards(typically 85 degrees). ![]() The Loco control uses CV's 5,2 6 and 9 unconventionally in this version. If not being used for code timing this pin works as per the Static version, being switchable as an output, or as in input, both with addresses set via the Locoio interface. A front light (D3) and Back light (D2) are also defined and will switch on with f0 and changes of direction. This latter is also the blue led on the esp8266. IT ALSO uses D0 for RST and D4 for SS pin. The RFID reader uses D7,D6 and D5 for MOSI, MISO and SCK. When #define _LOCO 1 (line 1 of the ino) is set, the code sets itsself up as a MOBILE device, and expects a RFID reader RC522 to be fitted. this is pulsed to indication message reception and is also used for the RFID interface (see later). D1 can be selected to give timing pulses for debug and test purposes. just do not try to use it for Red Led control!. Using the following ports can or will cause issues: D0 is the red led, but we can still use D0 for a servo. It should quickly flash when a message is sent or received. D4 is connected to the ESP8266 blue led, which is used to indicate message reception on the board or switch change detection. The Addressit sends will be the one set in locoio interface. Note: The red led will turn on because D0 is used on a V2 module.) When a change is sensed on an input it will send a B2 Message to rocrail. Servos turn off after reaching their positions (plus a short additional delay) to save power. The basic servo/switch software sets up ports as either servos, Inuts or outputs. The Standard LOCOIO programming interface in Rocrail then sets the addresses and modes The Module address is based on the Wifi IP address, so all nodes will report a different address. This is the generic code, and has been mainly tested as a mobile device CODE IS IN DEVELOPMENT.BE careful. A mobile version (set #define _Loco) of the code accepts standard Loconet commands and acts as a single command station and controls the loco motor through Servo output connected to D8. With the stationary version (set #define_Static) multiple ESP8266's can be used as stationary nodes and sense trains, or be used to swich signals or servos to control points. This is experimental code that controls Servos and /Switches and reads RFID tags over WIFI using Loconet UDP. WIFI ESP8266 Arduino code for use with Rcorail. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |