Hello. 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.
The project goes like this:
1) I am suppose to record an audio then "stop and save".(Earlier on i'm required to create a timer to estimate time of audio, n i've already done so under timer3)
2) When i select [in the coding, its declared as checkbox1] Monitor Light Intensity(Audio Alert), im also required to key in at the 'Threshold level' of 0.2V higher than the 'Voltage Level Representing Light Intensity'.
3) Actually the project currently works like this. When i select Monitor Light Intensity(Audio Alert), key in at the "Threshold level" of 0.2V higher than the "Voltage Level Representing Light Intensity", then when i placed my hand over the sensor, the audio doesnt sound till i remove my hand from e sensor then e audio will sound.
4) But my project requirement , requires to :
(a) Play audio when hand is placed over sensor, and
audio stops when hand is removed from sensor.
(b) If audio is 30 sec, and my hand is placed over for 1 min, im required to replay e audio again.
5) I am suppose to edit from the part shown below and also do something to the timer:
If IsNumeric(TextBox1.Text) Then
If CDbl(TextBoxVoltage.Text) > CDbl(TextBox1.Text) And Len(TextBox1.Text) <> 0 Then 'If light intensity is lower than level
If CheckBox1.Checked = True Then
Call PlayAudio() 'My.Computer.Audio.Play("D:\record.wav", AudioPlayMode.Background) <-- i'm required to edit from here
End If
6) I was wondering if i could add in :
If Timer3.Interval = ? And ? Then
Call PlayAudio() 'My.Computer.Audio.Play("D:\record.wav", AudioPlayMode.Background)
Else : Call StopANDsave()
End If
I was wondering if this method will work? Because i am suppose to know and declare the Duration of the audio And Triggering point , then the audio will play out according to my project requirement.
Attached is the GUI picture and coding of my project. Sorry, but this is my 1st time doing on visual basic therefore i may need some help and guidance on it . Thanks in advance. =)
Unfortunately, you have posted this in the VB6 section of the forum but it belongs in the NET section of the forum.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
By the way, though I don't know NET code, I did read through some of your DOC info. You do realize that the Serial Port has no direct function or method to measure voltage levels on the RX pin. Your project is going to need a Photo-Resistor or similar device coupled to a PIC's ADC input who's SerOut pin is properly interfaced to the RX pin of your Serial Port.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
Thank you for your time in reading my post and apologies for posting at the wrong section as i didnt know its under .NET, i'll take note of it in future, thanks for informing me too. =)
Well, the codes are actually done by my school lecturer and i'm a student doing my final year project. Was given this assignment, tried different ways but still couldnt work, tried for a week already. =( i totally had no basic foundation on visual basic and i was given this assignment. But i've got to continue trying till i find the solution. =)
Your .doc file indicates that there is a sensor connected to the PC, using the serial port. What is that sensor (box)? Have you attempted to debug the serial data coming in?
You do need to ask this question in the .NET area.
However, we need to know what you have done to make progress, so that we don't go off on the wrong track. So, we need to know where the problem is to be found. If we attempt to figgure something out, just looking at code, we will be taking the long way around.