with NMF 4.3 and Fez Hydra, I started to use TouchC8, the round sensitive pad.
Proximity detection and 3 buttons work (Up/middle/down), but functions about wheel seems not reliable and suffer of latency :
touchC8.IsWheelPressed()
touchC8.GetWheelDirection()
touchC8.IsWheelPressed()
touchC8.GetWheelPosition()
In debug, using GetWheelPosition(), each time I touch the wheel, an error occurs (but not when I use one of the three other buttons), and the function first returns a very big value (18432 for example), and the next call of the function (after remove my finger) returns a “normal” value in degree (0;360)
I suppose that if this function doesn’t work, other functions like GetWheeelDirection can not work properly.
Is it serious doctor ? maybe it was not a good idea to buy an obsolete device…
Hello,
Yes, a motor driver L298 was connected to socket 7, using only one motor, and it seems to work correctly.
C8 module was connected to socket 6.
These connections were made of standard gadgeteer cables.
Nothing else except USBClientDP on socket 2…
Thanks,
Arnaud.
Sorry, i was not clear.
My hardware config is C8 touch + motor driver. I’ve never tested 2 motors, only one. And with my program, this motor works with the driver module, but not the C8touch.
I’ve create a new project with only touchC8, using mainboard.SetDebugLED() to check result of touchC8 functions. My program works with a 100 ms timer. Problem still occurs :
touchC8.IsProximityDetected is reactive, no visible delay.
touchC8.IsWheelPressed has about half a second of delay.
touchC8.IsButtonPressed(Up/…) are reactive too.
But I’ve remark something using touchC8.IsButtonPressed(Up/Mid/Down) :
[ul]when I press Up button, my led ligths.
When I press Middle or Down button, led keeps off.
But i a press any part of the wheel, the light turns on… with latency.[/ul]
Precision concerning latency of wheel’s functions. If I press wheel then unpress immediatly, nothing occurs (same timing on “IsButtonPressed” works). I had to keep my finger pressed for a longer time (but less than 0.5 s), and after have removed my finger, the led turns on… and keeps on during 2 ou 3 cycle (100ms).
If I keep my finger pressed, led turn on then off 2 or 3 times.
What sort of test can I do again ?$
Thanks,
Arnaud.
Hello,
after a night, I remark my previous post is not clear (… again, sorry)
Wrong : But I’ve remark something using touchC8.IsButtonPressed(Up/Mid/Down) :
Correct : But I’ve remark something using touchC8.IsButtonPressed(Up) :
[ul]when I press Up button, my led ligths.
When I press Middle or Down button, led keeps off.
But i a press any part of the wheel, the light turns on… with latency.[/ul]
Same principe with Mid and Down button.
Hello,
here is my test program, but about handlers…
void ProgramStarted()
{
Debug.Print("Program Started");
Mainboard.SetDebugLED(true);
Thread.Sleep(200);
Mainboard.SetDebugLED(false);
GT.Timer timer = new GT.Timer(100); // Create a timer
timer.Tick += timer_Tick; // Run the method timer_tick when the timer ticks
timer.Start(); // Start the timer
}
bool state = false;
void timer_Tick(GT.Timer timer)
{
//state = !state; // Invert the state (to blink the LED)
if (touchC8.IsButtonPressed(TouchC8.Button.Down) == false)
{
state = false;
}
else
{
state = true;
}
Mainboard.SetDebugLED(state); // Set the LED to state
}
@ arnaud.audrezet - I ran your code on the FEZ Hydra using the latest SDK with only the TouchC8 connected on socket 6. Everything worked fine for me. Can you reflash the firmware and try a different socket? Make sure you do not have anything else connected (except the USB client module).
I’ve check firmware and saw my loader was not correct. It was 4.3.6.0.
After update :
Loader (TinyBooter) version information:
4.3.7.7 on this computer.
4.3.7.7 on this device.
The Loader (TinyBooter) is up to date. <<<
Firmware (TinyCLR) version information:
4.3.7.10 on this computer.
4.3.7.10 on this device.
The Firmware (TinyCLR) is up to date. <<<
I had to say that the antistatic packaging that was under touchC8 has disturb my first step today…
:-[
Now I can say that TouchC8 works properly on socket 5, but the same problem still occurs on socket 6.
I didn’t check socket 5 before update loader and firmware.
I precise only touchC8 and usb client modules are connected.
Hello,
yes ! TouchC8 on socket 5 and motor controller on socket 7 works properly. I’ve tested several times after reset or disconnect power : full success.
After that, I’ve connected TouchC8 on socket 6 then power on the board. It has worked, really ! but after a reset or turn Off/On usb power : It has never work properly anymore.
All these tests has been performed with the same software, and in program diagram touchC8 was allways connected to socket 6.
I’ve tested after diagramm change : touchC8 connected to socket 5 : It is the opposite (maybe worst…).
So, concerning touchC8 :
Diagramm config / real plug / result
5 / 6 / ok
5 / 5 / nok
6 / 5 / ok
6 / 6 / nok
Maybe a problem in pins 3 and 6 managment ?
Thanks,
@ arnaud.audrezet - Unfortunately since we cannot reproduce it here, it is possibly something with your board. Since socket 5 works, I would stick with that.
@ John,
I’ve progressed, and I thank you. I understand that it becomes difficult for you if you can not reproduce it.
Can we check something again, concerning hardware config :
[ul]Fez hydra Rev 1.2
Touch C8 1.3[/ul]
Considering my last test about inversion of diagramm / inversion of problem location (see last post), I’m worried about my next tests with various devices gadgeteer or not. I don’t want to have such problem, i’m afraid it will really block me later. I should contact my resseler for warranty and change the board.
Can you tell us what other modules you have or what other electronics parts you may have that we can use for testing? For example, a breakout module and LEDs for example, to test pin functions etc.
I don’t have a Touch C8, but do have a Hydra sitting on the bench somewhere, happy to try to help do further tests that I can mimic to make sure everything is working correctly.
@ Brett
here is the list of device I’ve :
GHI modules :
[ul]Pulse InOut module (still not tested)
Compass
3 way reflectors
Tunes
and also Motor Driver L298 and the famous TouchC8
Board : I’ve got only Hydra.[/ul]
Other modules :[ul]
Basic RC servo
4 ways ADC converter (I2C)
Proximity and ambient light sensing module (VL6180x, from SparkFun)
Ultrasonic sensors.[/ul]
I also have a basic picoscope, I can perform I2C analyse but only on short frames…
Thanks !
I didn’t know this sort of code because I’m a C#'dummy, but it seems interresting to me. I’m learning !
Reminder : In my diagramm, TouchC8 is connected to socket 6. In this case, my basic test program works properly only if TouchC8 is connected to socket 5. (100ms timer and control the debug led). This is the main conclusion of previous posts.
When I comment my timer and function code (timer not launched), and add your code, debug message works properly if TouchC8 is connected to socket 6 (coherent with diagram), but not on socket 5. Possibly this is a key for you, our maybe it is normal…?
When I use your code and my timer function in the programm…
[ul]debug still appears only on coherent socket (if I run it in debug mode)
My function allways works properly on incohrent socket, regardless of run with or without debug, or switch off/on usb power of the board.
On coherent socket, in debug mode my function works ! (and debug works…) But…
On coherent socket, each time I start from VS without debug : my function works almost. Sometimes debug led turn off wrongly…
On coherent socket, each time I switch off / on the board: my function doesn’t work anymore (my classical problem…)[/ul]
So, abstract :
on incoherent socket : function ok, but no debug available.
on coherent socket : function ok when debug is active.
I hope it helps you, and that I’m clear…
Thanks again.
Arnaud.