RaspberrySharp icon indicating copy to clipboard operation
RaspberrySharp copied to clipboard

New models?

Open iminet opened this issue 5 years ago • 17 comments

Hey, what's about new models, such as Pi 4 variants? This lib is great but I'm really missing the new models and new features as well. Is this project also abandoned like it's predecessor?

iminet avatar Apr 09 '20 11:04 iminet

No the project is still alive. I'm working to move some features to the new system.device.iot. When the Microsoft project will be ready, than this one will die. I do not have a PI4, but I can add it if you need.

JTrotta avatar Apr 09 '20 17:04 JTrotta

Sure, it would be great, thank you! I tried to use some other information what can be found in the files /proc/cpuinfo and /proc/meminfo. Let me know, if you need these snippets.

iminet avatar Apr 09 '20 18:04 iminet

Chcek if the result is like this, or, better, copy and paste me the result you get:

processor : 0 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3

processor : 1 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3

processor : 2 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3

processor : 3 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3

Hardware : BCM2835 Revision : c03111

JTrotta avatar Apr 09 '20 20:04 JTrotta

Hi there, Can this lib. be used on a Pi 4b? If not then could you please let me know how else I can access Pi 4b peripherals & gpio using c# / mono. Thank you!

CsharpAndVB avatar Aug 27 '20 04:08 CsharpAndVB

@CsharpAndVB Yes.

JTrotta avatar Aug 31 '20 08:08 JTrotta

Super!

Only, the 4b isn't mentioned in the list of supported models:

https://github.com/JTrotta/RaspberrySharp#supported-raspberry-pi-versions

CsharpAndVB avatar Aug 31 '20 19:08 CsharpAndVB

Hi, I just compiled the Blink example in VS2019 community, copied over Blink.exe and RaspberrySharp.dll to the Pi 4b and tried to run it. Unfortunately it just crashes and the DOS window disappears after half a second or so. The initial connection line causes the crash:

conPin = new GpioConnection(ProcessorPin.Gpio16.Output());

If I remove all references to the GPIO then the program works (obviously).

Any help getting this working would be most appreciated.

Thank you

CsharpAndVB avatar Aug 31 '20 21:08 CsharpAndVB

Hi, I just compiled the Blink example in VS2019 community, copied over Blink.exe and RaspberrySharp.dll to the Pi 4b and tried to run it. Unfortunately it just crashes and the DOS window disappears after half a second or so. The initial connection line causes the crash:

conPin = new GpioConnection(ProcessorPin.Gpio16.Output());

If I remove all references to the GPIO then the program works (obviously).

Any help getting this working would be most appreciated.

Thank you

Did you run as sudo? That’s the issue 99% of the time.

tylerforsythe avatar Aug 31 '20 21:08 tylerforsythe

Hi, I just compiled the Blink example in VS2019 community, copied over Blink.exe and RaspberrySharp.dll to the Pi 4b and tried to run it. Unfortunately it just crashes and the DOS window disappears after half a second or so. The initial connection line causes the crash: conPin = new GpioConnection(ProcessorPin.Gpio16.Output()); If I remove all references to the GPIO then the program works (obviously). Any help getting this working would be most appreciated. Thank you

Did you run as sudo? That’s the issue 99% of the time.

Hi,

Sorry, I'm new to the Pi therefore I'm not sure how to do that. In terminal I switched to root, then ran "mono Blink.exe". This reported "Object ref. not set to an instance of an object".

Problem appears to be the variable "driver", which is NULL.

Any clues how I fix this?

Thank you

CsharpAndVB avatar Aug 31 '20 22:08 CsharpAndVB

@JTrotta Hi, I just tried the demo. app. The log file also reports the same error "Object ref. not set to an instance of an object". Thanks

CsharpAndVB avatar Aug 31 '20 23:08 CsharpAndVB

@JTrotta Hi, sorry to trouble you but could you please help me get this working on a 4b?

I'm just trying to get the BLINK example working and it appears the DRIVER object is NULL.

Thank you

CsharpAndVB avatar Sep 01 '20 20:09 CsharpAndVB

you tryed "sudo mono blink.exe" ? Unfortunatly i does not have 4b so i can't really troubleshoot ++

Graveen avatar Sep 02 '20 05:09 Graveen

@Graveen Hi, yes - I've tried that and I get the same "Object ref. not set to an instance of an object." error.

If you run the Blink program on your windows machine you will see the same error when the program tries to create a new IO connection.

The error occurs at this line: Driver.Allocate(configuration.Pin, configuration.Direction);

… because the Driver object is NULL.

Thanks for your help!

CsharpAndVB avatar Sep 02 '20 21:09 CsharpAndVB

I think the problem is that the software actually isn't compatible with the 4b. I notice there's a GetModel function and the 4b is not listed in the Switch statement, so "unknown" is returned. @JTrotta Can you please add the 4b to this? Thank you

CsharpAndVB avatar Sep 02 '20 21:09 CsharpAndVB

Hello, I do not have a 4b yet. As soon as I got a 4b, I will add it to RaspberrySharp.

JTrotta avatar Sep 03 '20 07:09 JTrotta

@JTrotta Thanks, but that could be months from now & I was hoping to get this working soon. I will try to get it working myself but I can't get remote debugging to work either so it's all a bit of a pain! :-) Plus I'm new to mono & the pi so I'm a bit of a fish out of water at present.

CsharpAndVB avatar Sep 03 '20 07:09 CsharpAndVB

How do I get this to NET5 so I can use it with upgrades of my app in VS2022? I have been trying some things but apparently it is not so simple or I miss the obvious.

HansR00 avatar Dec 10 '21 15:12 HansR00