Jump to content

Search the Community

Showing results for tags 'print'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 3 results

  1. Hi, I am using Energia ethernet library for Ti Tiva c 129 Launchpad. I wrote a simple program in Energia that gets a byte from stream and sends back two bytes. It seems there is lag when I send bytes back from Ti board. Here is my code. byte mac[] = {0x00, 0x0A, 0xB7, 0x52, 0xBA, 0x16 }; IPAddress ip(192,168,1,192); IPAddress gateway(192,168,1,1); IPAddress subnet(255,255,255,0); EthernetServer server(80); EthernetClient client; void setup() { Ethernet.begin(mac, ip, gateway, subnet); server.begin(); Serial.begin(9600); } void loop() { byte buf[2]; buf[0] = 'O'; buf[1] = 'K'; client = server.available(); if (client.available()) { char c = client.read(); if (c == 'S'){ Serial.print("A"); client.write(buf, 2); } } } And i am sending data from a simple vb program like this Dim d As Byte() data = New [Byte](2) {} d = System.Text.Encoding.ASCII.GetBytes("S") stream.Write(d, 0, d.Length) While stream.DataAvailable = False End While stream.Read(data, 0, data.Length) d = System.Text.Encoding.ASCII.GetBytes("S") stream.Write(d, 0, d.Length) While stream.DataAvailable = False End While stream.Read(data, 0, data.Length) d = System.Text.Encoding.ASCII.GetBytes("S") stream.Write(d, 0, d.Length) While stream.DataAvailable = False End While stream.Read(data, 0, data.Length) MessageBox.Show("Test") It takes more than half a second for "Test" message to appear on the screen using Ti Tiva C129 board and Energia. If we send data byte by byte like this: client.write('O'); client.write('K'); It works fine. I tried the same program with Arduino Mega and it works fine regardless of how we send it. When using Arduino Mega it takes less than maybe 50 milliseconds for message to appear on the screen
  2. Hi, I had interface MSP430F5529 launchpad with FatFS Sd card. I was trying to store value from ADC into SD card and I found that I cannot store the value on SD Card, unless I do "sprintf" or equivalent printf of the data, only then I was able to store the value on SD card. However, sprintf is expensive command and takes more cycle then ADC output i.e some of the data is lost from ADC in doing sprintf. Is there a better alternative than sprintf or something like if I store raw value and later post process it? Any help will be highly appreciated. Thanks
  3. I'm lovin' the ease of the Energia environment for rapid prototyping but I've run across an issue with some code I'm trying to implement. Here it is with the serial output Program: /* ** Simple program designed to simulate pushing 180 degrees of 10 meter scan times ** for testing of VB.NET GUI ** */ String inputString = ""; boolean run = false; String outString = ""; int i = 0; void setup() { Serial.begin(9600); inputString.reserve(200); outString.reserve(200); } void loop() { if (run) { for (i = 0; i < 179; i++) //Print 10 meter ping times for each scan angle { outString += i; outString += String("$932944#932944#932944#"); //Test data to simulate 10 meter distance Serial.println(outString); outString = ""; } } } void serialEvent() { while (Serial.available()) { char inChar = (char)Serial.read(); if (inChar == '\n' && inputString == "START") { run = true; inputString = ""; } else if (inChar == '\n' && inputString == "STOP") { run = false; inputString = ""; } else if (inChar == '\n') { Serial.println("Please use valid command: START | STOP"); inputString = ""; } else { inputString += inChar; } } } Data Received From MSP430: 0$932944#932944#932944# 1$932944#932944#932944# 2$932944#932944#932944# 3$932944#932944#932944# 4$932944#932944#932944# 5$932944#932944#932944# 6$932944#932944#932944# 7$932944#932944#932944# 8$932944#932944#932944# 9$932944#932944#932944# 10 11 12 13 14 15 16 17 18 19 20 21 22 23 || It then continues on to 179 || Why on earth does it stop printing the second string? Oh also: M430G2553 , onboard clock and hardware UART EDIT: Is the .reserve(bytes) necessary for the strings?
×
×
  • Create New...