Asked — Edited
Resolved Resolved by DJ Sures!

Sonar For Universalbot

Hello,

First a little background: I have to do a senior project for my class. The thing is it had to use the raspberry pi. So I chose to use the raspberry pi and the Ez-Robot for my project. I have windows IOT on my raspberry pi and have the universalbot sdk/project. I have looked through the code and didn't find a class for the sonar.

My question is How would i get values from the sonar using the universalbot application? And do I have to do anything special in order to recieve the value from there? Any help would be appreciated. Thank YOU.


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

#1  

Hopefully DJ or one of our other programmers will answer, but instead of looking for Sonar, look for Ping sensor or Ultra-sonic sensor. The ARC Sonar control is a combination of the ping sensor, and a servo sweeping back and forth. You would need to program that functionality yourself if not using ARC, but the servo controls are certainly there, and I expect the Ping function is there and you just missed it by searching for the wrong term.

Alan

PRO
Synthiam
#2  

The distance sensor is in the ezb.hc_sr04 class

Also, you may find the mono library real good as well. The mono library does include some additional features, such as Auto Position that the uwp does not support.

PRO
USA
#3  

if you are using windows 10 IOT on your RPI2 or RPI3, only pcl assemblies targeting the .NETCore will be allowed in a UWP Project, you can't use mono library.

if you change to Linux (e.g. Raspbian), you can use the Linux MONO framework to run your application with EZB Mono SDK.

@DJ:

One quick question Mono SDK, is not compatible with the Xamarian development (Android or IOS). I know you have your priorities but if you some time using your current base code and through PCL assemblies you can create a single SDK targeting: UWP Xamarin (Android & IOS & Windows Store) Linux Mono.

Let me know if you have plans/date for that.

PRO
Synthiam
#4  

It is compatible with xamarin development - it's what the mobile app is built with. what issuse are you having?

PRO
USA
#5  
  1. add MONO ez_b.dll to the xamarin Droid
  2. Project Build
  3. Error

Quote:

Severity Code Description Project File Line Suppression State Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'System.Drawing.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.Execute() EZClient.Droid

I'm not using System.Drawing anywhere (does not exist in the Android profile).

PRO
Synthiam
#6  

Add the nuget packages for Shim

With xamarin, you will spend a lot of time in nuget installing supporting libraries. Xamarin is a great compiler but their support and implementation is absolutely terrible. Every release breaks your code. It's an absolute nightmare to deal with.

PRO
USA
#7  

does not work, i tried Shim & Shim.Image

Quote:

System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

the PublicKeyToken is used by Microsoft, unless you recompile the EZ_B.dll with a reference to Shim.*.dlls, i don't think you can force the binding.

Are you using Shim.Imaging ? Their website mentions a commercial license, I'm not sure what is being used from System.Drawing to justify using their (Shim.Imaging)...

PRO
Synthiam
#8  

No I use the system.drawing that's included with android and iOS xamarin.

Let me remove the requirement for you- or why not just use uwp library source from the software link?