Jump to content

bluehash

Administrators
  • Content count

    7,261
  • Joined

  • Last visited

  • Days Won

    187

Reputation Activity

  1. Thanks
    bluehash reacted to xeebot in [SOLVED] Sending Email To Hosted Server   
    @energia

    Sorry for the delay following up on this - had some family medical issues that I had to be present for.

    If it is okay, I'm posting my version here in case somebody else needs to do the same thing, will save them a few steps

    I basically combined the sketch you linked to with the WPA example - this allowed me to get details about the board (mac, IP) and do basic troubleshooting. Switched the Ethernet client to WiFi and plugged in my own values for SMTP and email addresses.  I put a comment in indicating which lines somebody who wants to use this would need to change.

    My next step is to combine this with the "test" firmware I wrote for my PCB, and, if everything works on the Launchpad, upload the bin using Uniflash. Will let you know how that works out!

    Code from attached Sketch:
     
    //combines the WPA WiFi example with the Arduino "panic email" sketch - uses WiFi client in place of Ethernet - WPA client shows data about your board and connection in serial monitor // //replace the variables on lines 8, 10, 12, 15, 17, 18, 67, 71, 75, 82, and 84 (for your board and your SMTP server) // //If all variables are correct, board connects to router then waits until SW3 is pressed, then sends email. // #include <SPI.h> #include <WiFi.h> WiFiClient client; //the Pin for SW3 on a launchpad int buttonPinSW3 = 3; //your router's SSID char ssid[] = "YourSSID"; //your router's password char password[] = "YourPassword"; boolean statusCheck=false; //your board's mac address byte mac[] = { 0xDA, 0xE5, 0x13, 0x25, 0x47, 0xB8 }; //your SMTP server char server[] = "mail.send.com"; int SMTPport = 25; void setup() { Serial.begin(115200); Serial.print("Attempting to connect to Network named: "); Serial.println(ssid); WiFi.begin(ssid, password); while ( WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to Network named: "); Serial.println(ssid); Serial.println("."); delay(300); } Serial.println("\nYou're connected to the network"); Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { Serial.print("."); delay(300); } Serial.println("\nIP Address obtained"); printCurrentNet(); printWifiData(); pinMode(buttonPinSW3, INPUT); } void loop() { if(digitalRead(buttonPinSW3)==HIGH && statusCheck==false) { if(sendEmail()) Serial.println(F("Email sent")); else Serial.println(F("Email failed")); statusCheck = true; } else if (digitalRead(buttonPinSW3)==LOW) { statusCheck = false; } } byte sendEmail() { byte thisByte = 0; byte respCode; if(client.connect(server,SMTPport)) { Serial.println(F("connected")); } else { Serial.println(F("connection failed")); return 0; } if(!eRcv()) return 0; // change to your public ip client.println(F("helo [173.6.157.102]")); if(!eRcv()) return 0; Serial.println(F("Sending From")); // change to your email address (sender) client.println(F("MAIL From: <sender@send.com>")); if(!eRcv()) return 0; // change to recipient address Serial.println(F("Sending To")); client.println(F("RCPT To: <reader@readme.com>")); if(!eRcv()) return 0; Serial.println(F("Sending DATA")); client.println(F("DATA")); if(!eRcv()) return 0; Serial.println(F("Sending email")); // change to recipient address client.println(F("To: You <reader@readme.com>")); // change to your address client.println(F("From: Me <sender@send.com>")); client.println(F("Subject: Panic Alarm!\r\n")); client.println(F("The panic button was pressed!!!")); client.println(F(".")); if(!eRcv()) return 0; Serial.println(F("Sending QUIT")); client.println(F("QUIT")); if(!eRcv()) return 0; client.stop(); Serial.println(F("disconnected")); return 1; } byte eRcv() { byte respCode; byte thisByte; int loopCount = 0; while(!client.available()) { delay(1); loopCount++; // if nothing received for 10 seconds, timeout if(loopCount > 10000) { client.stop(); Serial.println(F("\r\nTimeout")); return 0; } } respCode = client.peek(); while(client.available()) { thisByte = client.read(); Serial.write(thisByte); } if(respCode >= '4') { efail(); return 0; } return 1; } void efail() { byte thisByte = 0; int loopCount = 0; client.println(F("QUIT")); while(!client.available()) { delay(1); loopCount++; // if nothing received for 10 seconds, timeout if(loopCount > 10000) { client.stop(); Serial.println(F("\r\nTimeout")); return; } } while(client.available()) { thisByte = client.read(); Serial.write(thisByte); } client.stop(); Serial.println(F("disconnected")); } void printWifiData() { // print your WiFi IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); Serial.println(ip); byte mac[6]; WiFi.macAddress(mac); Serial.print("MAC address: "); Serial.print(mac[5], HEX); Serial.print(":"); Serial.print(mac[4], HEX); Serial.print(":"); Serial.print(mac[3], HEX); Serial.print(":"); Serial.print(mac[2], HEX); Serial.print(":"); Serial.print(mac[1], HEX); Serial.print(":"); Serial.println(mac[0], HEX); } void printCurrentNet() { Serial.print("SSID: "); Serial.println(WiFi.SSID()); byte bssid[6]; WiFi.BSSID(bssid); Serial.print("BSSID: "); Serial.print(bssid[5], HEX); Serial.print(":"); Serial.print(bssid[4], HEX); Serial.print(":"); Serial.print(bssid[3], HEX); Serial.print(":"); Serial.print(bssid[2], HEX); Serial.print(":"); Serial.print(bssid[1], HEX); Serial.print(":"); Serial.println(bssid[0], HEX); long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.println(rssi); byte encryption = WiFi.encryptionType(); Serial.print("Encryption Type:"); Serial.println(encryption, HEX); Serial.println(); }  
    WiFi_Email_Example.ino
  2. Like
    bluehash reacted to chicken in Congrats for reaching level 430   
    Shouldn’t there be a special badge on 43oh for earning 430 reputation points?
    Well, congrats to my dear friend @Fmilburn for having crossed that line of 43oh awesomeness 

  3. Thanks
    bluehash reacted to JoeG in MSP432 with WS2811 LED strip, where to start?   
    Sorry being a newbie to 430oh.com if this is a no-no posting to old threads. 
    But did get the Neopixel Library working with an MSP432 Launchpad (some tweaking of the Cortex-Mx assembly required. Much thanks to the WS2811 driver mentioned here:
    Only problem is I am not the greatest C++ programmer and had to hardcode the GPIO somewhat in Adafruit_NeoPixel.cpp :
    //jg 12/5/17 P1.0 is pin 78. 0x40004C02 YELLOW_LED
    //jg 12/5/17 P2.0 is pin 75. 0x40004C03 RED_LED
    //jg 1/3/18 P3.0 is pin 18. 0x40004C03 - Gets Neopixel off LED jumper on MSP432 LP
    But hooks are in Adafruit_NeoPixel.cpp if someone knows PIN_TO_BASEREG array from \Energia15\packages\energia\hardware\msp432\3.8.0\system\driverlib\MSP432P4xx\gpio.c
    Please see attached 3 files (hopefully all you need to test. The Adafruit_NeoPixel.h file has a very minimal but key change ) and let me know if it works for you.
     
    Adafruit_NeoPixel.cpp
    Adafruit_NeoPixel.h
    strandtest_joe.ino
  4. Thanks
    bluehash reacted to Rei Vilo in Hello   
    Both CCS Cloud and CCS standard support Energia.

  5. Like
    bluehash got a reaction from Rei Vilo in 2018   
    Hello Everyone,
    I would like to wish all of our members and visitors a wonderful new year. Thank you for contributing and answering posts. 
    Keep posting and wish you all the best.
  6. Thanks
    bluehash reacted to xeebot in {SOLVED] Anybody have a copy of cc3200_drivers_win.zip?   
    Can anyone send me a copy, please? I have the SDK installed, so the board shows properly in Device Manager, but I get a compile error in Energia.

    Prior to this, I did a clean install of Energia on a new install of Windows and when I went to grab the CC3200 drivers, they're not available:
    http://energia.nu/guide/guide_windows/
    The link to http://energia.nu/files/cc3200_drivers_win.zip  shows:
     
    Oops! Our 404 is showing...
    That page can’t be found.
    Nothing was found at this web address. Click your back button, use the menu tabs, or try a search?
     
     
  7. Like
    bluehash got a reaction from Rei Vilo in 2018   
    Hello Everyone,
    I would like to wish all of our members and visitors a wonderful new year. Thank you for contributing and answering posts. 
    Keep posting and wish you all the best.
  8. Like
    bluehash got a reaction from Rei Vilo in 2018   
    Hello Everyone,
    I would like to wish all of our members and visitors a wonderful new year. Thank you for contributing and answering posts. 
    Keep posting and wish you all the best.
  9. Like
    bluehash reacted to xeebot in Is it Better to Change Header or Remap GPIO in my Sketch?   
    I missed this when I answered the Pm yesterday!

    There are 10 GPIOs (1 ADC, 1 PWM, 2 UART)
    GPIO  0    PIN 44    ADC - EN   (voltage measurement)
    GPIO  1    PIN 46    TX (UART)
    GPIO  2    PIN 47    RX (UART)
    GPIO  4    PIN 49    VMEAS_BAT  (voltage measurement)
    GPIO  5    PIN 50    ADC - DRV5053 - omnidirectional Hall sensor
    GPIO 10    PIN 3     PWM - Piezo
    GPIO 12    PIN 9     LED
    GPIO 13    PIN 10    DRV5032 bi-directional Hall sensor 
    GPIO 14    PIN 5     LED
    GPIO 28    PIN 19    LED
    Is that too many to remap an existing board?
  10. Thanks
    bluehash reacted to agaelema in (Yet another) LCD 16x2 library - Easy to configure   
    Hi guys,
    To train the use of some macros I decided to update/improve a 16x2 lcd library (HD44780) that I adapt many years ago.
    Possible there are other libraries shared here, but I liked how I managed the configuration of ports and pins using some macros. The use of macros made the library more versatile and easy to adap to new projets without the need to change tons of code lines.
    The same simples example of use is runnig on MSP430G2553 (old value line launchpad) and MSP430FR2433 (the new value line launchpad).
    I hope it's useful.
    https://github.com/agaelema/LCD16x2_MSP43x
  11. Like
    bluehash reacted to Rei Vilo in [Energia Library] RTOS Libraries for MSP432 on Energia MT   
    I've submitted three projects at Hackters.io about Energia Multi-Tasking and the Galaxia library.
    Multi-Tasking with Energia MT with Galaxia Library   How to run multiple tasks on a LaunchPad? We're using two different solutions, one standard and another based on the Galaxia library. By Rei Vilo .   
    Manage Single Resource with Energia MT and Galaxia     How to manage a single resource across multiple tasks? Semaphores come to the rescue. By Rei Vilo .    Send Data Across Tasks with Energia and Galaxia     How to send data across tasks? Mailbox can help! By Rei Vilo .    Feel free to click on Respect Project!
  12. Like
    bluehash reacted to agaelema in MSP-EXP432P111   
    Thanks @bluehash
    The main objective is to use this launchpad as part of the embedded system of my thesis related to smart metering.
    I can solve two problems
    - A simples interface, like the LCDs present in energy meters
    - A good amount of flash and mainly of RAM to run signal processing and other things
  13. Like
    bluehash reacted to Rei Vilo in MSP-EXP432P111   
    @agaelema Have a look at my project of Low Power Weather Station.
    The LCD library designed for the MSP430FR4133 and MPS430FR6989 shouldn't be difficult to port to the MSP432P111.

  14. Thanks
    bluehash reacted to agaelema in MSP-EXP432P111   
    Hi guys,
    The new Launchpad MSP-EXP432P111 was released some days ago. I bought one and it arrived today .

    The board use the XMS432P1111 (pre-production version of MSP432) microcontroller, a Cortex M4 with 48MHz, 2MB of flash, 256KB of SRAM (very impressive), 14bit ADC and many other peripherals, like the LCD driver.
    Apparently, the LCD is the same of other launchpads (eg.: EXP430FR6989), very interesting to understand how to use the LCD driver and develop some projects.

    The Out-of-Box demo has two modes:
    - Blink LED, where you can controll the frequency of blink pressing the button S1 and controll the color by pressing the button S2.
    - Temperature mode: Show the temperature based in the internal sensor (pressing S2), or based in an external temperature sensor (pressing S1), a LMT70, but it's necessary to put a jumper in R8, powering the sensor.
    There is a online GUI enabling to control other parameters like special characters in the LCD.

    The finishing of PCB's is impeccable, as always.


  15. Like
    bluehash reacted to Rei Vilo in Pin Map for cc3200 launchpad [SOLVED]   
    For the pins map, see https://embeddedcomputing.weebly.com/launchpad-cc3200-wifi.html 
    With Energia, use pin numbers instead of port.bit names. The latter aren't supported.
  16. Like
    bluehash reacted to terjeio in RFC: CNC BoosterPack   
    I have recently been working on a CNC BoosterPack that I will make available on Github when completed later in the spring.

     

    Current specifications:
    Support for my HALified version of GRBL (based on 1.1), currently drivers has been made for MSP432 (black version), Tiva C and MSP430F2955.
    NOTE: firmware is built with CCS 6.1, MSP432 driver is 100% CMSIS based.
    Opto-coupled inputs, NC switches recommended.
    Opto-coupled outputs with 200mA open drain drive for spindle on, spindle direction, flood and mist.
    Can drive most relays and solenoids directly.
    Output section can be powered from internal 3V3 or 5V source, or from external source.
    If powered from external source outputs can be made opto-isolated via jumper setting.
    PWM-output for spindle speed currently directly connected to MCU pin (could be changed to open drain).
    I2C (IIC) interface with selectable voltage level (3V3 or 5V) via level shifter, dedicated interrupt input.
    I2C pinout compatible with my 4x4 keyboard project, supports jogging etc.
    Optional EEPROM for configuration settings for MCUs with no internal EEPROM.
    Polulu 8825 motor driver breakout board compatible. Fault signal routed to GPIO input.
    Considered for later revision:
    Break out SPI interface and add full support for Trinamic motor drivers.
    Optional (SPI) DAC for motor speed (laser power) control.
    This might require a 4-layer PCB and also solving the pinout cabal...
    ---
    Anything you want changed?
    Terje
  17. Like
    bluehash got a reaction from rawatgoal in Blog issue?   
    Hi All,
    It is a Wordpress issue. There was a minor update from Wordpress a few days back. 
    https://core.trac.wordpress.org/ticket/35344
     
    FTP access ports are blocked at work, so I'll patch when I get home.
    Thanks for the feedback.
  18. Like
    bluehash reacted to zeke in Amazon FreeRTOS   
    Apparently, Amazon purchased FreeRTOS!
    Here is a Q&A session with the creator of FreeRTOS - Richard Barry.
    Neato!
  19. Like
    bluehash reacted to Valerieflyer in Hello from Fort Worth, Texas   
    Hello,
    Just getting back into the microcontroller development aren.  In the nineties I got very familiar with the Intel 8751 all programming in assembly.  Times have changed!  A lot is easier now, but learning the new IDE and knocking the rust off my C programming.  We picked the MSP430 for the low power consumption.  Like others I had a little trouble getting Energia running but now no problems.  First project completed was a remote oxygen pressure monitor for the airplane.  We have also connected the LIS3DH accelerometer and have it working well.  I haven't figured out exactly how to import, modify arduino libraries yet so I just wrote directly to the chip following the data sheet.  No problems with the I2C.  Looking forward to more MSP430 projects.
    thanks,
    Valerie
     
  20. Like
    bluehash reacted to zeke in Amazon FreeRTOS   
    I just spotted this on Hackernews:
    https://aws.amazon.com/freertos/
    I am still reading about it but I thought others here would like to know about it. 
  21. Like
    bluehash reacted to Rei Vilo in Suggestions on MCU/Chip Selection   
    The G2553 has only 512 bytes of RAM. Go for a LaunchPad which MCU has more RAM.
  22. Like
    bluehash reacted to Rickta59 in Suggestions on MCU/Chip Selection   
    nothing like a timely response 
  23. Like
    bluehash reacted to NurseBob in Coding   
    @Neckbone,
    You need to supply significantly more information before anyone can provide help.
    1) Which MSP430 do you have? e.g. msp430g2553 or msp430f5529, etc.
    2) Is it a launchpad device
    3) What IDE are you using? (Energia? if so, what version)
    4) Copy and paste the error message so it can be evaluated
    5) Google is your friend when having problems with code, compilers, mcu, etc.
    Finally, only post each query/topic once.
    Bob
  24. Like
    bluehash reacted to dubnet in Hi all!   
    Welcome to the forum!
  25. Like
    bluehash reacted to jazz in How do you program the G2553 on Linux nowadays?   
    Stand alone software/hardware solution, that is working on any Linux I tried, and can be integrated in Energia.
    http://forum.43oh.com/topic/9337-where-do-i-find-the-script-that-runs-after-clicking-upload/?do=findComment&comment=76641
     
×