Browse over 10,000 Electronics Projects

An Open Source Motor Controller for everyone

An Open Source Motor Controller for everyone

Listing5

listing5



Advertisement1


In fact, in Listing 5 the const int OMC21address=4 code line can be found: its aim is to specify the slave towards which the communications happens; obviously other slave units as well may coexist on the TWI BUS, and they don’t have to necessarily be OMC21 motors. In the OMC21.ino sketch the specified value for the peripheral default address is 4, but it may be modified at leisure, if you want to use a peripheral on the bus, and it already has this address.

If more OMC21 controllers are used, it is needed that each one of them has an univocal address; thus you will have to load a sketch on which a different address has been specified, on each controller. While writing the control program you will have then to keep in mind the various addresses that have been assigned, in order to assure the proper data transit.

Pages: 1 2 3 4 5 6 7 8 9 10 11

 


Top