Tip: We would like to keep all reports contained in this one thread. Please continue to use this thread for any reports you may have on NETMF and Gadgeteer package 2014 R2-Beta1.
[em]Feature request:[/em] I would like to be able to covnert between Pin and PWMChannel, AnalogChannel and AnalogOutputChannel using GHI.Pins. I would love to see something like this to work:
Dim PWM6 As Cpu.PWMChannel = CType(Pin.P3_24, Cpu.PWMChannel)
Tried running my Cerberus application on G400⌠Total failure.
Canât find Moisture module in the toolbox.
TempHumidity module is there, but if I add it, generator adds wrong text in program.generated.cs:
Changing to this one fixes the problem:
```cs] private Gadgeteer.Modules.GHIElectronics.TemperatureHumidity temperatureSensor;[/code
3. DisplayN18 shows scrambled images (see attached).
4. It seems it can't get IP address from DHCP anymore, but I need more testing here...
Should I paste the code? I do not want to polute this thread with a huge post...
If there are no messages received, .ReadMessages() throws an ArgumentException, which is a) totally unrelated b) totally not expected (if there are no messages, I expect to get a zero-length Message[] buffer):
var can1 = new ControllerAreaNetwork(ControllerAreaNetwork.Channel.One, ControllerAreaNetwork.Speed.Kbps1000);
can1.ErrorReceived += (sender,e)=>{};//do nothing
can1.MessageAvailable += (sender, e) => { };//do nothing
can1.Enabled = true;
var messages = can1.ReadMessages(); //<-- throws ArgumentException, a zero length buffer would be correct behaviour
add Timings property to ControllerAreaNetwork class, which shows the current CAN bit timings. Makes sense since thereâs a constructor overload accepting Timings structure.
Getting this error on touch released on the cp7 with the fez raptor.
A first chance exception of type âSystem.NullReferenceExceptionâ occurred in mscorlib.dll
Error invoking method âGadgeteer.Modules.GHIElectronics.DisplayCP7+TouchEventHandlerTouchReleasedâ (check arguments to Program.BeginInvoke are correct)
Here is a simple example that will recreate the problem.
namespace GadgeteerApp4
{
public partial class Program
{
private Point last = new Point(0, 0);
private bool touched = false;
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
Glide.FitToScreen = true;
this.displayCP7.ScreenPressed += (a, b) => display_CP7_ScreenPressed(a, b);
this.displayCP7.ScreenReleased += (a) => display_CP7_ScreenReleased(a);
}
public void display_CP7_ScreenPressed(DisplayCP7 sender, DisplayCP7.TouchStatus touchStatus)
{
if (touchStatus.numTouches <= 0 || GlideTouch.IgnoreAllEvents)
return;
Point touch = new Point(touchStatus.touchPos[0].xPos, touchStatus.touchPos[0].yPos);
if (this.touched)
{
if (this.last.X != touch.X || this.last.Y != touch.Y)
GlideTouch.RaiseTouchMoveEvent(sender, new TouchEventArgs(touch));
//GlideTouch.RaiseTouchDownEvent(sender, new TouchEventArgs(touch));
this.last.X = touch.X;
this.last.Y = touch.Y;
}
else
{
this.last.X = touch.X;
this.last.Y = touch.Y;
this.touched = true;
GlideTouch.RaiseTouchDownEvent(sender, new TouchEventArgs(touch));
}
}
public void display_CP7_ScreenReleased(DisplayCP7 sender)
{
this.touched = false;
GlideTouch.RaiseTouchUpEvent(sender, new TouchEventArgs(this.last));
}
}
}
Additionally I attempted to convert the cp7 driver to use software i2c rather than native i2c. i2cbus.execute is failing with an index out of range exception on software i2c, as it attempts to enumerate the read write operation array. Iâll be building the core from the source this afternoon and attempt to find a solution to these two problem.
OK i figured out the problem with ScreenReleased events.
Change this:
if (!bSentReleased)
{
if (this.onScreenReleased == null)
this.onScreenReleased = new TouchEventHandlerTouchReleased(this.onScreenReleased);
if (Program.CheckAndInvoke(ScreenReleased, this.onScreenReleased, this))
this.ScreenReleased(this);
bSentReleased = true;
}
To this:
if (!bSentReleased)
{
if (this.onScreenReleased == null)
{
this.onScreenReleased = new TouchEventHandlerTouchReleased(GenericScreenEvent);
}
if (Program.CheckAndInvoke(ScreenReleased, this.onScreenReleased, this))
{
this.ScreenReleased(this);
bSentReleased = true;
}
}
In OnTouchEvent in the cp7 driver.
Where GenericScreenEvent is an empty function. The dispatcher doesnât like null values.
The same will need to be done for the gesture handler and menu buttons in the same function.
When I attempt to upgrade a Gadgeteer Spider from 4.1 to 4.3, I am unable to get the port to work on my device.
If I need to get a power supply for the device, which one should I get? It looks pretty standard, but GHI doesnât appear to have one specifically for the Gadgeteer that I can order.
Private Function startNetwork() As Boolean
If Not ethernetENC28.Interface.Opened Then
ethernetENC28.Interface.Open()
End If
ethernetENC28.UseThisNetworkInterface()
If ethernetENC28.Interface.CableConnected = False Then
Debug.Print("Cable DISCONNECTED ")
Return False
End If
If Not ethernetENC28.Interface.NetworkInterface.IsDhcpEnabled Then
ethernetENC28.UseDHCP()
End If
Do While ethernetENC28.Interface.NetworkInterface.IPAddress = "0.0.0.0"
Debug.Print("IP Address: " & ethernetENC28.Interface.NetworkInterface.IPAddress.ToString)
Debug.Print("Network connected = " & ethernetENC28.IsNetworkConnected.ToString)
Debug.Print("Is network up? " & ethernetENC28.IsNetworkUp.ToString)
Thread.Sleep(100)
Loop
Debug.Print("Network connected" & ethernetENC28.Interface.NetworkInterface.IPAddress)
Return True
End Function
I am simply trying to open a DHCP connection, and verify that a valid IP address has been granted.
I had quite a bit of trouble with this in 4.2, and it seemed somewhat particular to my router. In response you folks gave me a special build of 4.2 as described here: https://www.ghielectronics.com/community/forum/topic?id=14986&page=4
I have been keeping my fingers crossed that this fix had been baked into 4.3. Of course, with the revised syntax, I may have the initialization wrong.