Jump to content

Search the Community

Showing results for tags 'arduino'.



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 48 results

  1. Hello everyone, I'm basically trying to port over Arduino's SD card library (which utilizes SPI communication) to Energia, and am starting by testing whether I am able to properly initialize the SD card or not. First, I made sure that the Arduino library worked on an AT Mega 2560 and SD card that I have (it did). I then moved on to porting the library for Energia. I changed the pin mapping and the SPI settings to work for the F5529 and so far I can prove with a logic analyzer that the SD initialization function commands the CS, SCLK, MISO, and MOSI SPI lines in the exact same manner for the MSP430 as for the Atmel, byte for byte. Basically, the information coming in to and out of each mircrocontroller is exactly the same so I know that all the SD card information is there for me However, the problem is that the information does not seems to be received by the MSP430 in the same manner as the Atmel and causes the initialization to fail. I think the roots of this issue involve differences between the way the Atmel device DataloggerArduino.zip DataloggerEnergia.zip
  2. Arduino LCD display project brief introduction Some time ago, I found a heart rate sensor module MAX30100 in shopping online. This module can collect blood oxygen and heart rate data of users, which is also simple and convenient to use. According to the data, I found that there are libraries of MAX30100 in the Arduino library files. That is to say, if I use the communication between Arduino and MAX30100, I can directly call the Arduino library files without having to rewrite the driver files. This is a good thing, so I bought the module of MAX30100. I decided to use Arduino to verify the heart rate and blood oxygen collection function of MAX30100. With STONE TFT LCD screen for monitoring blood pressure. Purchase link of module MAX30100: https://item.taobao.com/item.htm?spm=a230r.1.14.69.c0c56556o8wH44&id=559690766124&ns=1&abbucket=2#detail Note: this module by default only with 3.3 V level MCU communications, because it defaults to using IIC pin pull up resistance of 4.7 K to 1.8 V, so there is no communication with the Arduino by default, if you want to commune with the Arduino and need two 4.7 K of the IIC pin pull-up resistor connected to the VIN pin, these contents will be introduced in the back of the chapter. Functional assignments Before starting this project, I thought about some simple features: • Heart rate data and blood oxygen data were collected • Heart rate and blood oxygen data are displayed through an LCD screen These are the only two features, but if we want to implement it, we need to do more thinking: • What master MCU is used? • What kind of lcd displayer? As we mentioned earlier, we use Arduino for the MCU, but this is an Arduino LCD display project, so we need to choose the appropriate LCD display module.I plan to use the LCD display screen with serial port. I have a STONE STVI070WT-01 displayer here, but if Arduino needs to communicate with it, MAX3232 is needed to do level conversion. Then the basic electronic materials are determined as follows: 1. Arduino Mini Pro development board 2. MAX30100 heart rate and blood oxygen sensor module 3. STONE STVI070WT-01 LCD serial port display module 4. MAX3232 module Hardware Introduction MAX30100 The MAX30100 is an integrated pulse oximetry and heartrate monitor sensor solution. It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. The MAX30100 operates from 1.8V and 3.3V power supplies and can be powered down through software with negligible standby current, permitting the power supply to remain connected at all times. Applications ● Wearable Devices ● Fitness Assistant Devices ● Medical Monitoring Devices Benefits and Features 1、Complete Pulse Oximeter and Heart-Rate SensorSolution Simplifies Design • Integrated LEDs, Photo Sensor, andHigh-Performance Analog Front -End • Tiny 5.6mm x 2.8mm x 1.2mm 14-Pin OpticallyEnhanced System-in-Package 2、Ultra-Low-Power Operation Increases Battery Life forWearable Devices • Programmable Sample Rate and LED Current for Power Savings • Ultra-Low Shutdown Current (0.7µA, typ) 3、Advanced Functionality Improves Measurement Performance • High SNR Provides Robust Motion Artifact Resilience • Integrated Ambient Light Cancellation • High Sample Rate Capability • Fast Data Output Capability Detection Principle Just press your finger against the sensor to estimate pulse oxygen saturation (SpO2) and pulse (equivalent to heartbeat). The pulse oximeter (oximeter) is a mini-spectrometer that USES the principles of different red cell absorption spectra to analyze the oxygen saturation of the blood. This real-time and rapid measurement method is also widely used in many clinical references. I will not introduce the MAX30100 too much, because these materials are available on the Internet. Interested friends can look up the information of this heart rate test module on the Internet, and have a deeper understanding of its detection principle. STONE STVI070WT-01 Introduction to the displayer In this project, I will use STONE STVI070WT-01 to display the heart rate and blood oxygen data. The driver chip has been integrated inside the display screen, and there is software for users to use. Users only need to add buttons, text boxes and other logic through the designed UI pictures, and then generate configuration files and download them into the display screen to run. The display of STVI070WT communicates with MCU through uart-rs232 signal, which means that we need to add a MAX3232 chip to convert RS232 signal into TTL signal, so that we can communicate with Arduino MCU. If you are not sure how to use the MAX3232, please refer to the following pictures: If you think the level conversion is too troublesome, you can choose other types of displayers of STONE Tech, some of which can directly output uart-ttl signal. The official website has detailed information and introduction: https://www.stoneitech.com/ If you need video tutorials and tutorials to use, you can also find it on the official website. Development steps Three steps of STONE display screen development: • Design the display logic and button logic with STONE TOOL software, and download the design file to the display module. • MCU communicates with STONE LCD display module through serial port. • With the data obtained in step 2, the MCU does other actions. STONE TOOL software installation Download the latest version of the STONE TOOL software (currently TOOL2019) from the website, and install it. After the software is installed, the following interface will be opened: Click the "File" button in the upper left corner to create a new project, which we will discuss later. Arduino Arduino is an open source electronic prototype platform that is easy to use and easy to use. It includes the hardware part (various development boards that conform to the Arduino specification) and the software part (Arduino IDE and related development kits). The hardware part (or development board) consists of a microcontroller (MCU), Flash memory (Flash), and a set of universal input/output interfaces (GPIO), which you can think of as a microcomputer motherboard. The software part is mainly composed of Arduino IDE on PC, related board-level support package (BSP) and rich third-party function library.With the Arduino IDE, you can easily download the BSP associated with your development board and the libraries you need to write your programs. Arduino is an open source platform. So far, there have been many models and many derived controllers, including Arduino Uno, Arduino Nano, ArduinoYun and so on. In addition, the Arduino IDE now not only supports the Arduino series development boards, but also adds support for popular development boards such as Intel Galileo and NodeMCU by introducing BSP. Arduino senses the environment through a variety of sensors, controlling lights, motors and other devices to feed back and influence the environment.The microcontroller on the board can be programmed with an Arduino programming language, compiled into binaries, and burned into the microcontroller. Programming for Arduino is implemented with the Arduino programming language (based on Wiring) and the Arduino development environment (based on Processing). Arduino-based projects can contain Arduino only, as well as Arduino and other software running on PC, and they communicate with each other (such as Flash, Processing, MaxMSP). Arduino project development environment The Arduino development environment is the Arduino IDE, which can be downloaded from the Internet. Log into the official website of Arduino and download the software https://www.arduino.cc/en/Main/Software?setlang=cn After installing the Arduino IDE, the following interface will appear when you open the software: The Arduino IDE creates two functions by default: the setup function and the loop function. There are many Arduino introductions on the Internet. If you don't understand something, you can go to the Internet to find it. Arduino LCD Project implementation process hardware connection To ensure that the next step in writing code goes smoothly, we must first determine the reliability of the hardware connection. Only four pieces of hardware were used in this project: 1. Arduino Mini pro development board 2. STONE STVI070WT-01 tft-lcd display screen 3. MAX30100 heart rate and blood oxygen sensor 4. MAX3232 (rs232-> TTL) The Arduino Mini Pro development board and STVI070WT tft-lcd display screen are connected through UART, which requires level conversion through MAX3232, and then the Arduino Mini Pro development board and MAX30100 module are connected through IIC interface.After thinking clearly, we can draw the following wiring picture: Make sure there are no errors in the hardware connection and proceed to the next step. TFT LCD user interface design First of all, we need to design a UI display image, which can be designed by PhotoShop or other image design tools. After designing the UI display image, save the image in JPG format. Open the software STONE TOOL 2019 and create a new project: Remove the image that was loaded by default in the new project, and add the UI image that we designed. Add the text display component, design the display digit and decimal point, get the storage location of the text display component in the displayer. The effect is as follows: Text display component address: • Connection sta : 0x0008 • Heart rate : 0x0001 • Blood oxygen : 0x0005 The main contents of UI interface are as follows: • Connection status • Heart rate display • Blood oxygen showed Generate configuration file Once the UI design is complete, the configuration file can be generated and downloaded to the STVI070WT-01 displaye. First, perform step 1, then insert the usb flash drive into the computer, and the disk symbol will be displayed. Then click "Download to u-disk" to Download the configuration file to the usb flash drive, and then insert the usb flash drive into STVI070WT-01 to complete the upgrade. MAX30100 MAX30100 communicates via IIC. Its working principle is that ADC value of heart rate can be obtained through infrared led irradiation. The MAX30100 register can be divided into five categories: state register, FIFO, control register, temperature register and ID register.The temperature register reads the temperature value of the chip to correct the deviation caused by the temperature. The ID register can read the chip's ID number. MAX30100 is connected with the Arduino Mini Pro development board through the IIC communication interface. Because there are ready-made MAX30100 library files in the Arduino IDE, we can read the heart rate and blood oxygen data without studying the registers of MAX30100. For those who are interested in exploring the MAX30100 register, see the MAX30100 Datasheet. Modify the MAX30100 IIC pull-up resistor It should be noted that the 4.7k pull-up resistance of the IIC pin of MAX30100 module is connected to 1.8v, which is not a problem in theory. However, the communication logic level of the Arduino IIC pin is 5V, so it cannot communicate with Arduino without changing the hardware of the MAX30100 module.Direct communication is possible if the MCU is STM32 or another 3.3v logic level MCU. Therefore, the following changes need to be made: Remove the three 4.7k resistors marked in the picture with an electric soldering iron. Then weld two resistors of 4.7k at the pins of SDA and SCL to VIN, so that we can communicate with Arduino. Arduino Open the Arduino IDE and find the following buttons: Search for "MAX30100" to find two libraries for MAX30100, then click download and install. After the installation, you can find the Demo of MAX30100 in the LIB library folder of Arduino: Double-click the file to open it. This Demo can be directly tested. If the hardware connection is ok, you can download the code compilation into the Arduibo development board and see the data of MAX30100 in the serial debugging tool.The complete code is as follows: /* Arduino-MAX30100 oximetry / heart rate integrated sensor library Copyright (C) 2016 OXullo Intersecans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include "MAX30100_PulseOximeter.h" #define REPORTING_PERIOD_MS 1000 // PulseOximeter is the higher level interface to the sensor // it offers: // * beat detection reporting // * heart rate calculation // * SpO2 (oxidation level) calculation PulseOximeter pox; uint32_t tsLastReport = 0; // Callback (registered below) fired when a pulse is detected void onBeatDetected() { Serial.println("Beat!"); } void setup() { Serial.begin(115200); Serial.print("Initializing pulse oximeter.."); // Initialize the PulseOximeter instance // Failures are generally due to an improper I2C wiring, missing power supply // or wrong target chip if (!pox.begin()) { Serial.println("FAILED"); for(;;); } else { Serial.println("SUCCESS"); } // The default current for the IR LED is 50mA and it could be changed // by uncommenting the following line. Check MAX30100_Registers.h for all the // available options. // pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA); // Register a callback for the beat detection pox.setOnBeatDetectedCallback(onBeatDetected); } void loop() { // Make sure to call update as fast as possible pox.update(); // Asynchronously dump heart rate and oxidation levels to the serial // For both, a value of 0 means "invalid" if (millis() - tsLastReport > REPORTING_PERIOD_MS) { Serial.print("Heart rate:"); Serial.print(pox.getHeartRate()); Serial.print("bpm / SpO2:"); Serial.print(pox.getSpO2()); Serial.println("%"); tsLastReport = millis(); } } This code is very simple, I believe you can understand it at a glance. I have to say that the modular programming of Arduino is very convenient, and I don't even need to understand how the driver code of Uart and IIC is implemented. Of course, the above code is an official Demo, and I still need to make some changes to display the data to STONE's displayer. Display data to the STONE displayer through Arduino First, we need to get the address of the component that displays the heart rate and blood oxygen data in STONE's displayer: In my project, the address is as follows: Heart rate display component address: 0x0001 Address of blood oxygen display module: 0x0005 Sensor connection status address: 0x0008 If you need to change the display content in the corresponding space, you can change the display content by sending data to the corresponding address of the display screen through the serial port of Arduino. The modified code is as follows: /* Arduino-MAX30100 oximetry / heart rate integrated sensor library Copyright (C) 2016 OXullo Intersecans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include "MAX30100_PulseOximeter.h" #define REPORTING_PERIOD_MS 1000 #define Heart_dis_addr 0x01 #define Sop2_dis_addr 0x05 #define connect_sta_addr 0x08 unsigned char heart_rate_send[8]= {0xA5, 0x5A, 0x05, 0x82,\ 0x00, Heart_dis_addr, 0x00, 0x00}; unsigned char Sop2_send[8]= {0xA5, 0x5A, 0x05, 0x82, 0x00, \ Sop2_dis_addr, 0x00, 0x00}; unsigned char connect_sta_send[8]={0xA5, 0x5A, 0x05, 0x82, 0x00, \ connect_sta_addr,0x00, 0x00}; // PulseOximeter is the higher level interface to the sensor // it offers: // * beat detection reporting // * heart rate calculation // * SpO2 (oxidation level) calculation PulseOximeter pox; uint32_t tsLastReport = 0; // Callback (registered below) fired when a pulse is detected void onBeatDetected() { // Serial.println("Beat!"); } void setup() { Serial.begin(115200); // Serial.print("Initializing pulse oximeter.."); // Initialize the PulseOximeter instance // Failures are generally due to an improper I2C wiring, missing power supply // or wrong target chip if (!pox.begin()) { // Serial.println("FAILED"); // connect_sta_send[7]=0x00; // Serial.write(connect_sta_send,8); for(;;); } else { connect_sta_send[7]=0x01; Serial.write(connect_sta_send,8); // Serial.println("SUCCESS"); } // The default current for the IR LED is 50mA and it could be changed // by uncommenting the following line. Check MAX30100_Registers.h for all the // available options. pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA); // Register a callback for the beat detection pox.setOnBeatDetectedCallback(onBeatDetected); } void loop() { // Make sure to call update as fast as possible pox.update(); // Asynchronously dump heart rate and oxidation levels to the serial // For both, a value of 0 means "invalid" if (millis() - tsLastReport > REPORTING_PERIOD_MS) { // Serial.print("Heart rate:"); // Serial.print(pox.getHeartRate()); // Serial.print("bpm / SpO2:"); // Serial.print(pox.getSpO2()); // Serial.println("%"); heart_rate_send[7]=(uint32_t)pox.getHeartRate(); Serial.write(heart_rate_send,8); Sop2_send[7]=pox.getSpO2(); Serial.write(Sop2_send,8); tsLastReport = millis(); } } Compile the code, download it to the Arduino development board, and you're ready to start testing. We can see that when the fingers leave the MAX30100, the heart rate and blood oxygen display 0. Place your finger on the MAX30100 collector to see your heart rate and blood oxygen levels in real time. Arduino LCD display project effect can be seen in the following picture:
  3. When installing energia on Linux Ubuntu the install runs successfully and produces a desktop icon and a menu item. The problem is that both launchers point to "/home/$USER/Downloads/energia-1.8.7E21/arduino" - but the file "arduino" does not exist in the energia directory so the app will not launch.
  4. So I'm working on a fingerprint scanner project with this repo written for arduino for the scanner I'm using. I am trying to make it work with an MSP430G2553 instead of the Arduino Uno. When I try using this library in Energia, it can't find the scanner despite being wired on the launchpad the same way that it is wired on the Arduino (External 5V source, Arduino pin 2 --> MSP430 pin 1.1, Arduino pin 3 --> MSP430 pin 1.2). The code compiles and the serial monitor outputs the test looking for the scanner, but it has yet to be able to find it. If anyone could give me any help with this, it would be greatly appreciated. Energia ino sketch is attached. EDIT: So after making myself more familiar with the code and the C++ imports, it seems the scanner works in 4 phases: 1) Take image 2) If image is a finger, convert it to digital features 3) Compare fingerprint features against features of enrolled fingerprints 4) Able to return result for the comparison and if its a match, return the ID# These lines: SoftwareSerial mySerial(5, 6); //Define serial communication on two pins Adafruit_Fingerprint finger = Adafruit_fingerprint(&mySerial); Seem to be whats handling all the fingerprint logic. So the issue isn't with the scanner, its with the communication between scanner and the MSP, most likely that I'm somehow defining output pins 5 and 6 (P1_3 and P1_4) incorrectly so they are not handling the scanner at all. fingerprint.ino
  5. Hi all, I have recently acquired a color click board (https://www.digikey.co.uk/en/product-highlight/m/mikroelektronika/color-click-board) and would like to get it working with one of my MSP430 Launchpads. A sketch already exists for the Arduino (https://github.com/raivisr/TCS3471-Arduino-Library/blob/master/TCS3471/examples/ColorSensor/ColorSensor.pde) I have tried porting it over to MSP430, but have been unsuccessful. Do you have any suggestions as to where I may be going wrong? Problems are with undefined references. Thanks!
  6. This project was my final project for the Embedded Systems Class at John Brown University. For this project, I used a Sparkfun RGB and Gesture Sensor, an Arduino, and a Raspberry Pi. I used the Arduino to read in gesture directions from the gesture sensor and then set a certain GPIO pin high, delayed, and then set the pin low based on which direction was sensed, left or right. This GPIO pin was connected toa a GPIO pin on the Raspberry Pi. The Raspberry Pi took the signal from the GPIO pin and sent a specified command out to the Linux command line from an already running Bash script. The command sent changed the page of an open PDF file on the Raspberry Pi GUI based on the gesture direction.
  7. Hi, I wrote an article (in Portuguese) about how to use the SD16 ADC of MSP43F2013, and to show one practical application I transformed the MSP430F2013 in an I2C 16-bit ADC, similar to ADS1115. In the example, I read the data using one Arduino Nano. Comparing the conversion of SD16 and ADS1115: More details about the project can be found in my Github: https://github.com/agaelema/msp430f20x3_as_i2c_16bit_adc The project is open to further improvements/optimizations and functions.
  8. Hello I'm trying to read all the IO from a port (port 2) on my M430G255 MCU . On arduino I could have use the line DDRB = B11111111; data = PINB; I've read some posts but no one talks about port manipulation on energia and msp boards clearly. can someone help me figure out how to woks with registers and msp boards ? thanks EDIT : I found the register file on the energia installation folder, but every time that i try to charge e a register I get the error: expected unqualified-id before numeric constant
  9. As the title states, I need help coding an LED cube consisting of 27 RGB LEDs. I am very new to Charlieplexing and I have no idea how to wire it. I have attached the document that I am using to map out my wiring. Please help me complete it! I just need to know what wires I should connect. Thank you! https://ibb.co/jJKVW1Q (actual hardware) https://ibb.co/H7SFxDM (actual hardware) https://ibb.co/yq2Yyd2 (actual hardware) https://ibb.co/1RYFdfK (layout of every LED column) https://ibb.co/3hrMtcj (diagram for 1st set of wires) https://ibb.co/6sdhbjq (diagram for 2nd set of wires) https://ibb.co/tcPSxF0 (diagram for 3rd set of wires) https://ibb.co/Lvtsd8q (diagram for 4th set of wires)
  10. Does anyone know if MSP432 (black) can be added to the standard Arduino setup? The reason: I've got an Adafruit Feather M0+ board working with Arduino, so the ARM Cortex-M compiler is "already there". I'm hoping maybe I could remove Energia (since I don't need the '430 support). If I add the JSON board file for the black MSP432 launch-pad, will the Arduino IDE get everything it needs to play with the MSP432? https://energia.nu/packages/package_msp432_black_index.json Also, is there a JSON file for the Tiva TM4C123 launch-pad? (same reason, have a Tiva, want to move everything over to one IDE). Thanks!
  11. I am planning to start a project using msp432p401r launchpad with a 3.5 inch TFT touch screen. This is my first time doing such a project. I hope that I can get some advice I have searched for 3.5" TFT touch screen with resolution of 480x320. Most of them are compatible with Arduino and Raspberry PI. Here is the link ('https://www.waveshare.com/wiki/3.5inch_TFT_Touch_Shield" Can anyone please help me porting the below project of arduino to energia so that i can interface the LCD with MSP432P401R. 3.5inch_TFT_Touch_Shield_Code.7z
  12. Hi, Is there anyway I can convert specific Arduino Libraries to Energia? I am using lora.h github library in Arduino, but now I want to use it on Energia. How can I modify this library to support my msp430g2553 device on Energia? Thank you.
  13. Hi, When doing offset calibration for pH sensor in Arduino we bring pH 7 to 2.5V as Arduino analog output is 5V. Does that mean when the same is done with msp430g2553 the voltage be adjusted to 1.5V as msp430g2553 analog pins output around 3V only? When I tried adjusting the pot I could only bring it to a minimum of 2.5V with msp430. Does anyone know why? Thanks.
  14. I want to make a connection Modbus TCP slave. For this I use a Arduino libraries. I am using the EK-TM4C1294XL Kit The could enter and take the example they have in the library, the example compiles correctly. Board is connected to a switch and a PC is connected also has disabled the Windows firewall. I use a Modbus TCP client program on the PC to read the records of the kit through Modbus. I can not read the values, tells me it can not connect to the target computer, the connection was denied. If I make ping the IP of the plate answer me well. Someone can help me solve the problem The code is as follows: #include <SPI.h> #include <Ethernet.h> #include "MgsModbus.h" MgsModbus Mb; int inByte = 0; // incoming serial byte // Ethernet settings (depending on MAC and Local network) byte mac[] = {0x90, 0xA2, 0xDA, 0x0E, 0x94, 0xB5 }; IPAddress ip(192, 168, 100, 109); IPAddress gateway(192, 168, 100, 1); IPAddress subnet(255, 255, 255, 0); void setup() { // serial setup delay(5000); Serial.begin(9600); Serial.println("Serial interface started"); // initialize the ethernet device Ethernet.begin(mac, ip, gateway, subnet); // start etehrnet interface Serial.println("Ethernet interface started"); // print your local IP address: Serial.print("My IP address: "); for (byte thisByte = 0; thisByte < 4; thisByte++) { // print the value of each byte of the IP address: Serial.print(Ethernet.localIP()[thisByte], DEC); Serial.print("."); } Serial.println(); // Fill MbData // Mb.SetBit(0,false); Mb.MbData[0] = 0; Mb.MbData[1] = 0; Mb.MbData[2] = 0; Mb.MbData[3] = 0; Mb.MbData[4] = 0; Mb.MbData[5] = 0; Mb.MbData[6] = 0; Mb.MbData[7] = 0; Mb.MbData[8] = 0; Mb.MbData[9] = 0; Mb.MbData[10] = 0; Mb.MbData[11] = 0; // print MbData for (int i=0;i<12;i++) { Serial.print("address: "); Serial.print(i); Serial.print("Data: "); Serial.println(Mb.MbData[i]); } // print menu Serial.println("0 - print the first 12 words of the MbData space"); Serial.println("1 - fill MbData with 0x0000 hex"); Serial.println("2 - fill MbData with 0xFFFF hex"); Serial.println("3 - fill MbData with 0x5555 hex"); Serial.println("4 - fill MbData with 0xAAAA hex"); } void loop() { if (Serial.available() > 0) { // get incoming byte: inByte = Serial.read(); if (inByte == '0') { // print MbData for (int i=0;i<12;i++) { Serial.print("address: "); Serial.print(i); Serial.print("Data: "); Serial.println(Mb.MbData[i]); } } if (inByte == '1') {for (int i=0;i<12;i++) {Mb.MbData[i] = 0x0000;}} if (inByte == '2') {for (int i=0;i<12;i++) {Mb.MbData[i] = 0xFFFF;}} if (inByte == '3') {for (int i=0;i<12;i++) {Mb.MbData[i] = 0x5555;}} if (inByte == '4') {for (int i=0;i<12;i++) {Mb.MbData[i] = 0xAAAA;}} } // Mb.MbmRun(); Mb.MbsRun(); } The files are: modbus_slave.rar The ModbusTCP Client PC program is:EasyModbusClient.rar modbus_slave.rar EasyModbusClient.rar
  15. Hi, I am trying to implement Modbus RTU slave over TCP/IP using TIVA Tm4c1294 connected launchpad. The code has been successfully tested using Arduino. However, when I use the same code in energia, the launchpad gets pinged, but Modbus RTU does not work . Is there any library, hardware configuration which I need to change while migrating fro Arduino to TIVA? MgsModbus_test_Slave.rar
  16. Hello All, I'm an electronics engineering student and I know little about programming.I was using arduino and I want to use TI MCU's. So for that reason I'm recreating my arduino projects on energia (tried code composer studio but it is too complicated for me). Some of my projects worked well on energia and i didn't make any changes of my codes it was wonderful but my end term project didn't compiled because of the library that i'm using so I'm trying to port a library from arduino to energia. The library that i'm trying to port is based on the SoftwareSerial library (formerly NewSoftSerial), authored by: ladyada (http://ladyada.net),Mikal Hart (http://www.arduiniana.org),Paul Stoffregen (http://www.pjrc.com),Garrett Mace (http://www.macetech.com), Brett Hagman (http://www.roguerobotics.com/) and it uses pin change interrupts. the library that i'm trying to port energia uses digitalPinToPCMSK and digitalPinToPCICR macros from the pins_arduino.h I was successful running this library on arduino but i cannot get it to work on energia. The error I'm gettin when i try to compile the code is; error: 'digitalPinToPCICR' was not declared in this scope 'error: digitalPinToPCMSK' was not declared in this scope it is going like this. The library i want to port from arduino is Arduino-SDI-12 created by Kevin M. Smith, S. Hicks and their team members the library is located at github (link: https://github.com/EnviroDIY/Arduino-SDI-12 ). What should I do to make it work? Any help will be appreciated. Thanks in advance, I'm using LaunchPad MSP-EXP430G2 v1.5 MCU MSP430G2553 Windows 10 PC and Energia 1.6 10E18 IDE
  17. Hi I am currently porting from Arduino to MSP430 platform. I want to port to attached Modbus Master and slave library to Energia. In modbus we have to set parity of serial communication, parity function is not there in MSP430 HardwareSerial.ccp library can anyone help me to add this function in energia library? Problem is not with modbus library but with Energia core library. Thanks SimpleModbusMasterV12.rar SimpleModbusSlaveV9.rar
  18. Please guide me how to port a library for energia or create one myself. I want to create library for SD card and Adafruit GFX. I will share it on Github and in this forum afterwards. Thank you.
  19. Dear Developers, I want to send data from MSP430F5529 to my Arduino Nano through UART connection. But somehow it is not working filne. I have used voltage devider circuit to convert Arduino's 5V to MSP's 3.3V. Connection Arduino's RX -> MSP's TX Arduino's TX -> MSP's RX Ground of Both -> ground of voltage devicer. Code of Arduino : const int chipSelect = 10; String inByte = " "; void setup() { // initialize both serial ports: Serial.begin(9600); } void loop() { if(Serial.available()) { char b = Serial.read(); Serial.println(b); } delay(50); } Code of MSP430F5529 void setup() { Serial.begin(9600); } void loop() { Serial.write("Hii"); delay(50); } Please Help me. Thank you.
  20. Dear Engineers, Please help me send data to Arduino from my MSP430F5529 using SPI interface. I want to use SPI iterface because in future I want to use the modified code for Attiny13A instead of the Arduino Leonardo. Details are given below. Thank you for your support. Information to Provide When Asking for Help: Model of LaunchPad used and revision number : MSP430F5529 Launchpad Rev 1.6 & Arduino Leonardo Model of the MCU used : MSP430F5529 & ATMEGA32U4~AU at 15Mhz Name and version of the IDE used : Energia 1.6.10E18 & Ardduino IDE 1.8.2 OS the IDE is running on : Linux Mint 18 Whenever possible, minimal code to replicate the issue : Required from good developer
  21. I am interfacing LM35 and SIM900 using MSP430F5529 board . For this purpose i am using Energia software . As we all know arduino code is compatible in Energia . Hence , I have used the same code that i used in Arduino Uno . The code works fine and i get my thingspeak channel updated with every HTTP request however , when i use Energia , it doesnt show any error , neither does it show/update my thingspeak channel . I had used Pin 7 and 8 for receiving and transmitting in Arduino . In Msp430 , I have used Pin P3.4 and P3.3 for receiving and transmitting . My Energia code is as follows - #include <SoftwareSerial.h> #include <String.h> SoftwareSerial mySerial(P3_4, P3_3); boolean pin2=LOW,pin3=LOW,pin4=LOW,pin5=LOW,pin6=LOW; float temp=0.0; void setup() { mySerial.begin(9600); // the GPRS baud rate Serial.begin(9600); // the GPRS baud rate pinMode(2,INPUT); pinMode(3,INPUT); pinMode(4,INPUT); pinMode(5,INPUT); pinMode(6,INPUT); delay(1000); } void loop() { temp=analogRead(A0); temp=temp*0.4887; delay(2); Send2Pachube(); if (mySerial.available()) Serial.write(mySerial.read()); } void Send2Pachube() { mySerial.println("AT"); delay(1000); mySerial.println("AT+CPIN?"); delay(1000); mySerial.println("AT+CREG?"); delay(1000); mySerial.println("AT+CGATT?"); delay(1000); mySerial.println("AT+CIPSHUT"); delay(1000); mySerial.println("AT+CIPSTATUS"); delay(2000); mySerial.println("AT+CIPMUX=0"); delay(2000); ShowSerialData(); mySerial.println("AT+CSTT=\"aircelgprs\"");//start task and setting the APN, delay(1000); ShowSerialData(); mySerial.println("AT+CIICR");//bring up wireless connection delay(3000); ShowSerialData(); mySerial.println("AT+CIFSR");//get local IP adress delay(2000); ShowSerialData(); mySerial.println("AT+CIPSPRT=0"); delay(3000); ShowSerialData(); mySerial.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"");//start up the connection delay(6000); ShowSerialData(); mySerial.println("AT+CIPSEND");//begin send data to remote server delay(4000); ShowSerialData(); String str="GET https://api.thingspeak.com/update?api_key=--------C&field1=" + String(temp); mySerial.println(str);//begin send data to remote server delay(4000); ShowSerialData(); mySerial.println((char)26);//sending delay(5000);//waitting for reply, important! the time is base on the condition of internet mySerial.println(); ShowSerialData(); mySerial.println("AT+CIPSHUT");//close the connection delay(100); ShowSerialData(); } void ShowSerialData() { while(mySerial.available()!=0) Serial.write(mySerial.read()); }
  22. Hi. I'm new to 43oh. My team is building a platform for the breadboard for software developers. It allows you to configure prototypes without wires or other components. How? Connect the controller board to your breadboard and PC. Connect channels to IO pins in the user interface. The user interface will interact with the hardware and implement your configuration on a breadboard via a programmable switch matrix, thereby replacing wires. Then, if you want the user interface to interact with the ADC onboard the controller board: Connect the GPIO channel to the ADC channel on the same IO pin. Set the ADC channel on. Then you can analyse the signal, as shown here: https://www.youtube.com/watch?v=YtL6YwalWnk There is also an interface on the controller board for custom shields, which can replace other components, such as higher precision ADC, a DAC, a MIDI controller, an SoC, wifi adapter or an FPGA. This feature is still in development. Tell what you think about this tool kit. You can follow this project at https://hackaday.io/project/18755-the-metaboard to get updated as we prepare for a crowdfunded manufacturing run.
  23. Hey everyone, I'm trying to interface an MSP-EXP430FR5969 with a GPS+GSM module (https://tronixlabs.com.au/arduino/shields/3g-shield/adafruit-fona-3g-cellular-breakout-900-and-2100-mhz-for-optus-vodafone-australia/) I've been able to send a text message to my mobile using the Arduino, but when I try on Energia 1.6 with the module now plugged into the MSP430 I get compilation errors (mainly due to atof not being declared). Here's the code I am using: #include <stdlib.h> #include <stdio.h> #include "Adafruit_FONA.h" #define FONA_RX 4 #define FONA_TX 3 #define FONA_RST 5 #include <SoftwareSerial.h> SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX); SoftwareSerial *fonaSerial = &fonaSS; Adafruit_FONA_3G fona = Adafruit_FONA_3G(FONA_RST); void setup() { while (!Serial); Serial.begin(115200); fonaSerial->begin(4800); fona.begin(*fonaSerial); sendText(); } void loop() { } void sendText () { char sendto[21]= "04XXXXXXXX"; char message[141] = "Text Text Text Text Text Text Text Text Text Text Text Text"; fona.sendSMS(sendto,message); if (!fona.sendSMS(sendto, message)) { Serial.println(F("Sending message")); } else { Serial.println(F("Sent!")); } } "C:\Users\...\Adafruit_FONA.cpp:909:30: error: 'atof' was not declared in this scope" is the main error I am getting. Any suggestions on how to have this compile please? Thanks in advance
  24. Hi, I'm doing my Senior design for undergraduate school which is developing an open source medical device using a microcontroller (Arduino or MSP432) with attached ECG, etc. circuits. Also, I am planning of including a LCD touchscreen that will display the recorded ECG signal. The main goal of this project is developing an open source medical device such that the user can add circuits to the microcontroller following the specification that I will develop. The circuits will be built up on top of each other using assigned pins. So, for this kind of project which microcontroller you think is better, in terms of the popularity of the platform and reputation-consider the market. Please make sure to specify which Arduino is suitable. Thanks.
  25. - INTRODUCTION Hi everybody, I want to share a library for controlling a 4-pins PING sensor (HC-SR04 ICStation) basically, although you can also control the 3-pins PING))) sensor conventional of Parallax (URL). This library is a modification of the Caleb Zulawski's library for PING))) sensors. I made basic improvements in calculations, I added a function to calculate the distance in millimeters and added the option to change the "input trigger signal" [10uS for HC-SR04 and 5uS for PING)))] - CHANGE LOG v2.1 (26/08/2014) * Fixed calculations of distance in inches. v2.0 (25/08/2014) * Fixed problems with measurements adjustments. * New function for modification of a single unit. v1.0 (24/08/2014) * Basic modification of Caleb Zulawski's library. * Added the calculation of distace in millimeters. * Identified problems with measurements adjustments. - TESTING Tested on: Tiva C (TM4C123GXL) & Arduino UNO R3 - COMPARISON SECTION A small comparison between the 2 sensors is: * HC-SR04 sensor: 1. Working Voltage: 5V (DC) 2. Output signal: Electric frequency signal, high level 5V, 0V low level. 3. Sensor angle: Not more than 15 degrees. 4. Detection distance: 2cm-450cm. 5. High precision: Up to 0.3cm 6. Input trigger signal: TTL impulse 10uS 7. Mode of connection: 1. VCC 2. TRIG ( T ) 3. ECHO ( R ) 4. GND * PING))) sensor: 1. Working Voltage: 5V (DC) 2. Output signal: Electric frequency signal, high level 5V, 0V low level. 3. Sensor angle: Not more than 15 degrees. 4. Detection distance: 2cm-300cm. 5. High precision: Up to 0.3cm 6. Input trigger signal: TTL impulse 5us 7. Mode of connection: 1. GND 2. VCC 3. SG - DOWNLOAD SECTION v2.1: Ping4Pins v2.1.zip v2.0 (Not recommended): Ping4Pins v2.0.zip v1.0 (Not recommended): Ping4Pins v1.0.zip - INSTRUCTIONS OF INSTALLATION 1. Download the latest version of the library 2. Unzip the zip-folder. 3. Copy the "Ping4Pins" folder in the location of the libraries depending of your trainer: * For Arduino: <Arduino IDE directory>\hardware\libraries\ * For Tiva C: <Energia IDE directory>\hardware\lm4f\libraries\ Note: If you used an older version of the library, I recommend deleting the folder and copy the new folder "Ping4Pins". - EXAMPLES SECTION In the "examples" folder are 5 examples for Arduino and 5 examples for Tiva. I'll post the example # 1: /*Example # 1 for TivaC / ArduinoCreated by Jeyson Zu
×
×
  • Create New...