Converts A Data Stream From A Picoscope Muscle Sensor

Apr 1, 2009

I am looking to create a VB 2008 Express program which converts a data stream from a picoscope muscle sensor into a power output board which controls a mechanism. In simple terms when the Muscle sensor reaches a value of 0.8 V or higher I want the programme to send a text file to the power output control programme, and likewise when the sensor is below 0.2 V I want the power to be zero.

So 0.8 V > = send text file (0O=100%)
0.2 V < = send text file (0O=0%)

so when muscles being senced move the device turns on and off. I think I am successfully getting the data stream from the Picoscope which is plugged in the usb. I am using codes and examples that the programming guide for the device provided. [Code] I just need to now how to get the data to be displayed or how to tell the programme to do something with the data. The device also came with an example of how it can record data to an excel sheet if anyone needs the code to gain a better understanding.

View 20 Replies


ADVERTISEMENT

Getting Control Using Picoscope Sensor

Apr 1, 2009

I am looking to create a VB 2008 Express programme which converts a data stream from a picoscope muscle sensor into a power output board which controls a mechanism.

In simple terms when the Muscle sensor reaches a value of 0.8 V or higher I want the programme to send a text file to the power output control programme, and likewise when the sensor is below 0.2 V I want the power to be zero.[code]...

View 3 Replies

Stream Read Return Length 0 While Stream Is Open And Has Valid Data In It?

May 25, 2012

in an winForm app in VS2010 win 7 compiling to x86, I try to do what Alvas.Audio seems to work. See (c# ex: [URL] for reference.

Dim data() As Byte = wr.ReadData(second * i, second)

The result give me data.length()=0. I do not have any exception, I can read format from it and whatever reader I use I got this problem.EDIT : After some tests, it seems like the uncompressed file I create in the first step (in PCM format, with .wav extension) can not be recognized by the Alvas.audio library for the second step. I must miss something around Audio file markups or something alike.

Here is the code that might be the source (basically this is step 1):

Dim functOut As String = String.Empty
Dim wr As Alvas.Audio.IAudioReader = Nothing
Dim fs As IO.FileStream = Nothing

[code]....

How can I write the resulted stream to be sure I can read it again later?

View 1 Replies

Click On A Muscle To See The Exercices?

Jun 21, 2010

im a fitness freak and i want to make a litle app for making workout routines.i need guidance for a couple of things..drag and drop images i wouder if in vb i can have a pic of lets say a man and we can click on a muscle to see the exercices..like a hotspot in dreamweaver..

View 2 Replies

Create An Interface For A Sensor?

Dec 7, 2011

How to access VB functions using C#? I am trying to create an interface for a sensor, whose files are given in VB format. How can i access themm and consequently make changes in the same?Ok! sorry for incomplete info. The files i have are .vbp and .frm format. I am trying to create a Form file(interface, with buttons etc.) using Microsoft Visual Studio2008, which has a included wrapper to combine C++ and C# and has console application. Now how do i call the .vbp files and to furthur work on the interface?

View 1 Replies

Pull Info From Sensor.dll?

Jan 15, 2010

I'm trying to get my hands on my ThinkPad T500 tilt sensor data.So the (unfinished, but works (i'll get three values, state,x and y)) code is:

Public Class Form1
Private Structure AccelData
Dim stat As Integer
Dim x As Short

[code]....

With debug.print I'll get the correct information, but as soon as I try to insert the outcomes to label.text I'll get error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

So, how can I pull the information from dll to label text?how to use the sensor.dll to extract information?

View 1 Replies

Communications :: Using Telnet To Read A Sensor

Jul 28, 2009

I am using Telnet in VB to read a temperature and RH sensor. I don't know that the data is the exact same length every time. I have pasted the code below. This code does get the data back. I have also pasted the unparsed and parsed data as well.... Sometimes I get more or less data than the time before and I think this is because I am not reading the entire buffer. How can I make this code run a little better so that I can get the proper data every time? Below the code is a sample of several readings. You can see how I get bad data periodically.

Unparsed
" 24.4155 45.2235 11.7921 200.9005 45.2372 45.2235 -42.0242"
Parsed (replaced " " with , and then " " with ,)

[Code].....

View 2 Replies

G-Sensor/Accelerometer, How To Find Values

May 3, 2009

I have been searching everywhere to figure out how to access the G-Sensor/Accelerometer in my HTC Touch Pro and other like devices. I've already created a number of app's for windows mobile but now I'd like to add some more customizations into my app's. I don't mind installing 3rd party app's but I'd like to add the same fuctionality into my own apps with regaurds to the G-Sensor/Accelerometer funtions. I got a hold of some code(Rhaakmeester)...

[code]...

This code helped a bit but only detects the change after a 3rd party app has already changed the screen orientation or if the KB was slid out. How do I access the G-Sensor data myself.

View 2 Replies

Light Sensor And Audio Announcement

Nov 6, 2009

I'm new at VB therefore i need some guidance on how to go about doing e current project that i have. Currently doing on Light Sensor and Audio Announcement.

[Code]...

View 5 Replies

Read The Value Of The Sonar-sensor Of NXT Through Bluetooth?

Sep 22, 2011

How is it possible to read the value of the sonar-sensor of my NXT through Bluetooth (and Visual Basic 2010)?

View 3 Replies

VS 2010 Make Shoutcast Stream Info Like The Stream Name

May 5, 2011

Im making a desktop player for a online web radio, and for the program I wanna make it show all the stream info. Like the stream name, and such. However I dont know how to do this? I looked everywhere

The server url is setup like this "[URL]" And it has all the stream info and that there. So is there a way I can get the info from there onto like say a label? Live updates btw.

View 1 Replies

Measure Distance Using Serial Port (sensor)?

Mar 21, 2010

measure distance using serial port (sensor)?

View 1 Replies

DataGridView - Displaying Data From TCP Stream

May 24, 2012

I am using a Data Grid View to display data that come in from a tcp stream. When the stream receives data, the data is parsed and placed at the top of the grid. These are my top 3 lines of the cell clicked event of the Data Grid View.

Code:
If SpotsGrid.CurrentRow.Index = Nothing Then Exit Sub
i = SpotsGrid.CurrentRow.Index
tempFreq = CStr(SpotsGrid.Item(1, i).Value)

I placed the top line there to prevent errors when a user clicks on a blank grid before any data has been placed in the grid and to stop selecting anything if a user clicks on a column header. But my problem is as data is added to the to the top line that line of data is not click-able because the index=0 or Nothing. So my question is what would be the best way to code this so it is protected from the user clicking on a blank grid and the column headers but still allow the user to click on the first line of data?

View 1 Replies

Encrypt / Decrypt Stream Of Data?

Aug 23, 2011

What are the best way to encrypt and decrypt stream of data ?I would like that my program read a file.. and unencrypt it in memory then when it save it.. it encrpyt the stream and save it.

View 1 Replies

Send Data Twice Over TCP Stream For It To Be Recognized?

May 17, 2009

I am sending data over a tcp connection but I need send it in pairs for it to be sent i.e. 1st Send (doesnt work), 2nd Send (works), third Send (doesnt work), fourth Send (works)

View 1 Replies

Set Up A CLASS To Represent A Data Stream?

Apr 1, 2009

I'm trying to set up a CLASS to represent a data stream.This is a newbie question so if the answer is obvious, please excuse me.Several of the data items are multiples which I would normally represent as an Array element.For example, in the code below, the element SolarNameplate has up to 10 instances, so I'd like to use array notation.I get errors, and it doesn't work, so I assume I can't do it like below.

QUESTIONS : 1 - is it possible to use an array element in a class ?

2 - is there another way to achieve what I want ?

Public Class SM1PS01
Private _Projid As String '... name or number of project
Private _LogoFile As String '... file containing customer logo[code]...........

View 18 Replies

Stream Pixel Data From An Image?

May 22, 2009

I am working on a program that alters very large images. The images are usually in .tif or .bmp format. I load up the old image, copy a section of it into a new image, then save the new image. So far everything works my problem is that the images that i have to alter are 900mb+. Using the simple Bitmap class is not working because the images are quite apparently too large to fit into memory that way. (throwing an OutOfMemory exception)I want to step over the part of loading the image, and turn it into streaming the pixels from the image straight from the disk. I kind of have an idea of how to get the stream open and start reading, but I have no idea what to do with the 32bit integers that are being returned. how to stream pixel data from an image?

Dim oldImage As Bitmap
Try
oldImage = New Bitmap(file)
Catch ex As Exception

[code].....

View 3 Replies

Stream Reader Missing Out Data

Dec 30, 2008

I've set up a stream reader to get data from a serial file, functionality for that is already set up.

My problem is that the program seems to be missing out every other line of code in the file, which kinda defeats the point of a serial file. [code]...

View 2 Replies

Stream.write Client Not Getting Data

Jul 14, 2010

This app is trying to send messages to a client listening on the port. The client's logs show that their port is being opened and closed, but no data coming in. Is there a bug or something missing in the following code, like perhaps stream.flush or stream.endwrite or a thread.sleep(0) line, that could cause this? The puzzling thing is, WireShark on the client computer does show the message my app is sending coming into the listening port.

[Code]...

View 3 Replies

Visual Basic Hard Disk Acceleration Sensor?

Oct 21, 2011

Is there a way to detect the motion sensor in the hard disk with visual basic .net?I know that hard discs has an acceleration sensor to turn the hard disk off when the computer falls from a height.I have seen one example of this in a game using this sensor.I want to detect the sensor so that my security program can alarm and email me if lets say someone nocks my computer to the floor while im gone.

View 1 Replies

Write An Application That Communicates With A Digi Watchport/D Sensor?

Jul 18, 2009

I am using Visual Basic Express 2008 to write an application that communicates with a Digi Watchport/D sensor. This is an IR sensor and I checked the manual for the commands to send to it. In order to get the distance, it say to send the sensor the command D<CR>. Here is my code so far...

Option Explicit On
Option Strict On
Imports System.IO.Ports
Public Class Form1

[Code]...

Every time when i click the button, I get the timeout exception error message.

View 1 Replies

TCP Clients Connect - Stream Data Is Lost

Apr 28, 2012

Connection succesfuly made (TCPClients) Writing/Reading with NetworkStream At an interval of 16 ms. Client sends 4 bytes -> Server receives 0 bytes ??? Server Sends 4 bytes -> client receives 0 bytes ???

[Code]...

View 11 Replies

VS 2008 Connect To TCP Data Stream - Rcv And Parse

Jul 2, 2011

Everyone seems to have their own TCP dilemma so I figured I'd ask this here and see what the pros have to say. Basically I need to connect to an IP 192.168.5.100, port 8000 and listen for all the data that is being sent out. When I Telnet to 192.168.5.100 8000, it shows as...

[Code]...

View 1 Replies

Writing Data Of Network Stream To Form?

Jun 1, 2009

I have looked over this and can't see where i'm going wrong, all i'm trying to do is add an item to a listbox when i a tcpclient logs on to the server. Code in question... If i put a breakpoint in i can see that initialclientresponse is set correctly.

Public Sub ConnectClient()
Dim pendingClient As TcpClient
Dim InitialClientResponse As String

[code].....

View 8 Replies

Code For A Program - Converts Weight ?

Jun 14, 2010

Code to make a program in visual basic that converts your weight from Earth to you weight on the Moon.

View 3 Replies

Converts A List To A Printable String?

Aug 17, 2011

I have the following code:

Public Shared Function GetListAsString(ByVal data As List(Of String)) As String
Dim retVal As String = "| "
For Each obj As String In data[cod

It converts a List to a printable String. Right now it is set up to work with just Lists. I feel as if it should be able to work with any type of Collection. I am new to Collections and generics.When I attempt to do something like

Public Shared Function GetListAsString(ByVal data As Collection(T)) As String
Dim retVal As String = "| "
For Each obj As String In data.ToString()[code].....

View 5 Replies

Downloading Page Data Using The Stream Reader Using Readline?

Feb 1, 2009

I am downloading page data using the stream reader using readline.I want to concatenate each line into one long string for parsing The below line of code is not working: datajoined =dataline.Insert(datajoined.Length - 1, dataline.Length - 1)My inevitable goal here is to track stream data with a progress bar. But first I must learn to dload page data in chunks.

[Code]...

View 2 Replies

Stream Reader And Writer - Read Data From A File

Jan 27, 2009

I am trying to make my application read data from a file. Then save the data back. However I keep getting an error which says the file is still open so cannot be edited. I also read that there is an issue with the streamreader and streamwriter do not close the program straight away. I was wondering if anyone had a way around this or any alternative ideas. Heres my code so far!

[Code]...

View 5 Replies

VS 2010 Truncate Charachters HEX Data Stream (Serial)?

Sep 4, 2010

The RX data from the serial port is as follows:

FE FE FA E0 00 23 45 FD

I need to truncate everything else and just have positions 5, 6 and 7 output in the hex in a TEXTBOX. See below:

452300

Instead it will put the the whole steam in the textbox and it will be in decimal format, not hex.

View 3 Replies

Function That Converts A String With Spaces To An Array?

Apr 7, 2012

I saw a built in function in VBscript a while back that converted a string with spaces to an array. However I can't remember the name and I looked it up in a few function listings and couldn't find it. Since almost all the functions that are in VBcript are in VB.NET I was wondering if anyone remembered the name of the function.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved