Main Site Documentation

Documentation and Examples


#1

I have recently had some great help from the community to get setup to deploy; having had a number of headaches to get to this stage.

I am now connecting the various components I purchased and working through learning how to use them.

What I am finding is in a lot of cases no documentation and no examples even in the discontinued items.

So far

  1. LED Strip - done
  2. Lightsensor - done
  3. Temp&Humidity - cannot find anything on this
  4. Relay16 - I believe I can understand the properties and the wiring of the relays. But there are two screw terminals at the end of the board; what are these; do these independent power?

#2

I have looked at that … not something I have a great deal of knowledge … but I assume from it and from the terminals on the board that it requires an independent 5v power supply?

It would be great if GHI had done a simple paragraph on each to describe the use of and a short example solution.


#3

Thank you … I design, build and program machine control system running sometimes with 400 amps … and I am still alive.

My knowledge at a lower level is not as good as it is with industrial controls PLC etc

The 12v is underneath the capacitor so I could not see it … but you are right voltage is dangerous, so why is there not a little more information on this product and some of the others ???

So I am now starting out with this; so how is a newbie supposed to have to delve into the drivers … I have found the developer guide for this one …

I bought several of everything to try and learn with … so for example I am now trying to use the TB10 breakout board … I assume I can use this to connect my analog devices to the board. But I cannot find any documentation on how to use it at the software level and/or the hardware level … which pins can be assigned to which type; solution example?


#4

there’s a couple of things you need to understand here.

First up is socket types and what the pins mean.

https://www.ghielectronics.com/docs/305/gadgeteer-sockets-quick-reference

Second, you might need to know what pins are connected to the mainboard you’re using - you’ll go to the schematics for that, if necessary.

Third, in a Gadgeteer app you access pins with a methodology like this code… this code grabs socket #3 and grabs pins 3, 4, 5, and 8 from that socket.


            MultiIO = GT.Socket.GetSocket(3, true, null, "Multi");
            btn1_Engage_Rly = new InputPort(MultiIO.ReservePin(Gadgeteer.Socket.Pin.Three, null), true, Port.ResistorMode.PullUp);
            btn2_StartStop = new InputPort(MultiIO.ReservePin(Gadgeteer.Socket.Pin.Four, null), true, Port.ResistorMode.PullUp);
            btn3_Event = new InputPort(MultiIO.ReservePin(Gadgeteer.Socket.Pin.Five, null), true, Port.ResistorMode.PullUp);
            Relay_Control = new OutputPort(MultiIO.ReservePin(Gadgeteer.Socket.Pin.Eight, null), false);

In a non-Gadgeteer app you just use the pin enumerations that the SDK provides.

hope that helps your TB10 journey !


#5

Hi Brett, thank you I will try this shortly. Where is the best place to find out the purpose of each parameter. What would be an example for analog read?

Looking at my objectives, I need to extend the sockets, I have an Ap5 hub extending the sockets, is there anything I have to specifically do to assign or find out the socket numbers on the hub?


#6

[quote=“Brett”]

Hi Brett, Maybe I need to avoid using drivers and work at the lower level as your code above shows; however GetSocket … I note that all sockets have a unique code in their properties … can I use this somehow to find a socket?? In otherwords; if I havwe hub … how can I find the socket numbers of these?


#7

I have no knowledge how the AP5 works, sorry. The GetSocket concept is that you explicitly plug an extender in the specified socket number, and then map the pins to individual uses - not sure the AP5 changes that at all. The only suggestion I can make is look at the managed code driver and see what you can make sense of there… 4.2 is at http://gadgeteer.codeplex.com/SourceControl/latest#Main/Modules/GHIElectronics/HubAP5/Software/HubAP5/HubAP5_42/HubAP5_42.cs

AnalogInput is the other input type you want…


#8

That’s a useful link and book marked … I cannot confess to being competent enough to understand it.

When I debug in VS how can I set a break point in this so I can step through its function; I assume I can then watch how it works and therefore understand how it works?


#9

the drivers are not installed in source code that you can step through. You can follow this approach https://www.ghielectronics.com/docs/122/gadgeteer-driver-modification to load a copy and step through that.