I am having a table with nvarchar feild in which values are entered like 1 4 8 25 I want a sql query to find the missing sequence of number in the above series... Thanks in advance...

Member Avatar
Member Avatar
+0 forum 5

Recently I have been trying to get a arduino to control the brightness of an 12v rgb strip using the serial monitor. The project that I'm doing this needs the colors: violet, blue, green, yellow, orange, and red. I cant figure out the code so if any one can help that would be great. thanks.

Member Avatar
Member Avatar
+0 forum 1

Hi, I am new to programming and have attached my code so far, i need to insert the code to read data from serial port but havent a clue where to put it or how any help would be great Imports System Imports System.IO.Ports Public Class Form1 Private mySerialPort As New SerialPort Private Sub ButtonShowPorts_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonShowPortsol.Click ' Show all available COM ports. For Each sp As String In My.Computer.Ports.SerialPortNames ListBox1.Items.Add(sp) Next End Sub Private Sub ButtonClearList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonClearList.Click ListBox1.Items.Clear() End Sub Private Sub ButtonClose_Click(ByVal sender …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have writen web sites before but have been asked to create a VB program, but dont know where to start so hoping someone can help me. I need to create a program that sits waiting for data from the serial port which is attached to a set of scales, when the scales are triggered they send the weight of the object down the serial port to the pc that then writes the data to a text file and then waits for the next weight to be received, and continuous to run until stopped at the end of the …

Member Avatar
Member Avatar
+0 forum 5

Hi there! I've googled around, and can't seem to find an answer to this question: How do you check if UART# has already been enabled or not? And what I mean is, I need to be able to get into python and say "If uart1 is not enabled, enable it". Here is the code to enable UART1 with Python on the BeagleBone Black Rev. C running Debian: #!/usr/bin/python # Enable UART1 so I can talk RS485 later import Adafruit_BBIO.UART as UART UART.setup("UART1") exit() This works fine, I run it, then I can run my serial communication scripts and all is …

Member Avatar
+0 forum 0

I'm using python to try and talk to my Arduino with pyserial. The code should wait for an input from COM5, (the arduino), and then sends a 1 and waits for the response. import serial connected = False ser = serial.serial("COM5", 9600) while not connected: serin = ser.read() connected = True ser.write("1") while ser.read() == '1': ser.read() ser.close() All I get if this error message. Traceback (most recent call last): File "C:\Users\Patrick\Documents\Python\serial.py", line 2, in <module> import serial File "C:\Users\Patrick\Documents\Python\serial.py", line 10, in <module> ser = serial.serial("COM5", 9600) TypeError: 'module' object is not callable

Member Avatar
Member Avatar
+0 forum 8

Hi, Im quite new to SerilaPort handling.Im trying to open a serial communication on a particular COM port.Im able to Open a new one by using CreateFile(L\\\\.\\Com5, GENERIC_READ | GENERIC_WRITE, 0, // exclusive access NULL, // no security OPEN_EXISTING, 0, // no overlapped I/O NULL); But I want to do this by getting the user input on the console ,say 'x' COM and then initialize it.Kindly help me with the way i should concatenate the com number'x' with L\\\\.\\Com .

Member Avatar
Member Avatar
+0 forum 4

here i am using fpdf class to generate pdf document, how to print serial numbers in SL.NO. column in sequential order i.e. 1 2 3 4 5 ... so on. <?php include_once('include/dbConnect.inc.php'); require('fpdf.php'); $d=date('d_m_Y'); $agentid=mysql_real_escape_string($_GET['agent']); $agent_name=mysql_real_escape_string($_GET['agentname']); // Query to select an int column $query = "select count(*) as cnt from custreg where magentid = '$agentid'"; $result = mysql_query($query); $cntrow = mysql_fetch_row($result); class PDF extends FPDF { // Page header function Header() { global $agent_name; global $agentid; global $number; // Logo $this->Image('images/logo.png',10,6,30); // Arial bold 15 $this->SetFont('Arial','B',15); // Move to the right $this->Cell(80); // Title $this->Cell(5,1,'Customer Payment Details',0,0,'C'); $this->Cell(10,15,'Agent ID: '.$agentid.' …

Member Avatar
Member Avatar
+0 forum 2

Hey. In VB.NET, I need to write an array of bits to the serial port, in such a fashion that I can directly control the output signal. For example, I write 00110110 in VB and I need to get exactly that on output. I have tried SerialPort.Writeline but it's not what I need. Any help appreciated. Thanks!!

Member Avatar
Member Avatar
+0 forum 1

how to get weight value form weight machine using php. serial port communication.

Member Avatar
Member Avatar
+0 forum 1

Hi, I have a device connected to the USB port of the laptop. This device pumps data to the port which is read by the python script. As per the baudrate of the board I use folowing configuration to open the port. Serial(options.port,921600,timeout=0.2,xonxoff=0,rtscts=1) But when I analyse the collected LOG file I see lot of data miss in between. Looks like buffer is over written. Can anyone please tell me what is happening ? Thanks in advance !

Member Avatar
Member Avatar
+0 forum 5

Hi all, I´m having troubles programming with C# for windows CE. I need to listen a serial port, I have the program for windows and it works fine but when I program it to windows CE I dont know why it does not recognize any event function. I normally use the event for the onRx but under the CE platform I think it does not work, does anyone know how to do that? Regards,

Member Avatar
Member Avatar
+0 forum 7

Hi I meet a problem I bought a **WD HDD** (WD2500AAKX) with **SATA3** connection but my **motherboard chipset** only supports **SATA1**. The question is: how to set **jumpers** and to slow down speed at 1.5 Gbps? On the HDD is saying that Jumper on Pin 5-6 slow down to 3 Gbps. When i connect the HDD, the BIOS doesn't see it. And all over the internet it saying that SATA3 is **compatible** with SATA1 chipset **thanks in advance** :)

Member Avatar
Member Avatar
+0 forum 2

im finding the serial number for windows 7 thanks and regards for mir aslam

Member Avatar
Member Avatar
+0 forum 5

Greetings, I am practicing developing software that can communicate with hardware via an RS232 connection. I am using new PC hardware and I don't have any serial ports, nor do I have any actual devices with me that use serial communication. Does anyone have any ideas or recommendations for software that can run on Windows, preferably on Windows 7 that can emulate a COM port device with basic text IO? It would be nice if I could use this software for free so freeware/open source software is best. Thank you.

Member Avatar
Member Avatar
+0 forum 4

Hi, I am coding some python to work with some wireless serial devices. I have 2 devices reading temperatures and other environmental data over an Xbee which then writes the data over serial. The data looks like this when read in Hex: *7e001090007d33a200408b2e0c2db7010016005763* The important character is the 7e at the beginning which is the start delimiter for the packets - device information and sensor data follows that. I have the following up to now: import serial ser = serial.Serial('com6',9600,timeout=1) while 1: Data_in = ser.readline().encode('hex') if Data_in[0:2] == '7e': Data_in.split('7e', -1) print "==========================" print "Found Packet: " + Data_in if …

Member Avatar
Member Avatar
+0 forum 3

Circuit, [Circuit Diagram](https://picasaweb.google.com/116591322380497799116/December52012#) Video: [Video](http://www.youtube.com/watch?v=qGoM_ydAtBc)

Member Avatar
+0 forum 0

help..!! help...! S.O.S i had dowloaded xp sp3 for free version at 23.00 wib/ 08/oct/2012, from softpedia but i don't know its Serial Number, when i installing it to my computer...who knows that? plz help me...

Member Avatar
Member Avatar
+0 forum 4

Hi, I've been trying to send a long integer from an Arduino to my C++ program via the serial port. There seems to be many examples of this when i search, but I've not had much luck except for one example. This example seems to work, but not when I send a negative integer. I'm not sure if it is my arduino code or my c++ code, or both that needs changing. Does anyone know how I could adjust this to work with negative numbers too? // Ardunino Code - Sends 4 bytes to C++ program on PC void IntegerToBytes(long …

Member Avatar
Member Avatar
+0 forum 4

hello can any one give me a simple examle code to read and write to serial port? i want to send data to the port and recevie the same. i use visual c++

Member Avatar
Member Avatar
+0 forum 1

Hello, I have developed an app. I want to protect this app, just like the one where we install some software by entering CD-key/Serial key. But I m not understanding how to do it? I want the serial key to be based on some formulation by MAC address! My Case: I will give my app to a user. Then, a form will display MAC Address(I got this part) and textbox - where user will enter the key after entering the correct key the app will work. The key must be different for different machine (since the mac will be different). …

Member Avatar
Member Avatar
+0 forum 2

In DOS, C, VB6 we could check if Transmitter Shift Register or Transmitter Holding Register empty or not before writing any data onto the serial port. This facility would certainly avoid making the attempt of writing while the port is not ready to accept data. similarly, we could check if valid data has arrived in the serial port receiver before we read data. I am converting my VB6 based serial communication codes into C#. But, I don't find anything (I mean method) in C# that will allow me to check if TX-register or THR is ready to accept data. Also, …

Member Avatar
+0 forum 0

Hey all, I am working on a project with an FPGA but I need serial communication between the FPGA and the desktop since the memory of the FPGA is limited and I need to be able to send longer inputs to the FPGA by using buffers on the desktop. After hours of browsing and reading, I still can't figure out why my code isn't working. I saw similar code snippets on different websites, but I can't seem to get the serial communication to work. The writing part is working (probably), but the reading goes wrong. Every 'real character' is followed …

Member Avatar
+0 forum 0

I am trying to use Java to detect signals from the serial port sent from an IR circuit. When the IR circuit detects an obstacle, it gives an output of 0 volts and otherwise the output is 5 volts. Can I read these voltage differences directly on the PC using Java. Do I need to have a PIC or some other micro controller integrated in the circuit?

Member Avatar
Member Avatar
+0 forum 4

[CODE]#include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <termios.h> int main() { int fd; int wd=0; unsigned char buff[] = { 0x02, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x23, 0x01, 0x21, 0x03}; fd = open("/dev/ttyS0", O_RDONLY | O_NOCTTY | O_NDELAY ); if (fd == -1) {printf("error opening");} else { printf("hi1"); fcntl(fd, F_SETFL, 0); wd=write(fd, buff, 13 ); printf("hi"); } printf("%d", wd); //i get fd to be 3 and wd to be -1 so what is the problem?? close(fd); } [/CODE]

Member Avatar
Member Avatar
+0 forum 2

serial port problem is occuring,,, pls guide on the same as i new to this,,, [CODE]#include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <termios.h> int main() { int fd; int wd=0; unsigned char buff[] = { 0x02, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x23, 0x01, 0x21, 0x03}; fd = open("/dev/ttyS0", O_RDONLY | O_NOCTTY | O_NDELAY ); if (fd == -1) {printf("error opening");} else { printf("%d", fd); //i get fd value to be 3 fcntl(fd, F_SETFL, 0); wd=write(fd, buff, 13 ); } printf("%d", wd); //i get wd to be -1, so what is the problem?? close(fd); …

Member Avatar
Member Avatar
+0 forum 4

Hello Having trouble reading in some 8-bit data (not text) from serial port using pyserial module. Am storing the data in a string buffer as it comes in, that's working fine. Problem is that I'm printing the buffer out to the terminal screen, after a wee bit of data (30~200 it changes randomly), the buffer printout stops printing the data out, but the data is being added to the buffer as I'm also printing out the buffer length, and its increasing. Below is sample output, see how it just stops printing out to terminal, but the buffer size is still …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone I'm using python 3.1 and am trying to use the pyserial library. However, when I try something like ser.write('hello'), I get a type error. [CODE]>>> import serial >>> ser = serial.Serial('COM13') >>> ser.write('a') Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> ser.write('a') File "C:\Program Files\Python31\lib\site-packages\serial\serialwin32.py", line 249, in write data = bytes(data) TypeError: string argument without an encoding[/CODE] how do I fix this? And is it normal to get this error? Most tutorials use the same format for the commands and don't get any error.

Member Avatar
Member Avatar
+0 forum 2

I am designing an application which communicates with another device via a serial port. My application buffers the received binary data until the data is valid/of known format, does some processing and then writes back a response. I understand this model is known as the consumer/producer model. The issue I am having with properly implementing this model is that the message processing part of my application is fairly complex and involves calls to other classes/methods, etc., and when spawning a new thread I can only pass it one function. How can I best implement this? Thank you for any help …

Member Avatar
Member Avatar
+0 forum 2

I want to write a program interrupts when the receive buffer for the serial port has received some data. I have done a little a bit of research and I believe C# word for interrupt is delegate. Apologies if I'm barking up the wrong tree but I want to know if there is method other than polling the read buffer of the serial port. I have used interrupts before but only in C on a PIC. Basically is it possible in C#? Cheers

Member Avatar
Member Avatar
+0 forum 3

The End.