Search found 1012 matches

by mnf
Fri Feb 02, 2018 7:34 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

One further problem - I can now no longer compile anything without importing the USB_HID component and initializing it.. C:\Users\Martin\DOWNLO~1>"C:\PROGRA~2\FLOWCO~1\compilers\avr\batchfiles\..\bin\avr-gcc.exe" -mmcu=atmega32u4 "C:\Users\Martin\DOWNLO~1\bluetooth1.o" "C:\Users\Martin\DOWNLO~1\usb_...
by mnf
Thu Feb 01, 2018 9:11 am
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

It's really just the demo program from the Flowcode Wiki... I added some strings to the index page (scroll up when clicking on them - I looked and thought not much here!) - but the temperature = B001 etc was part of the original and the the strings don't get substituted - which I suspect the html wa...
by mnf
Wed Jan 31, 2018 6:41 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

Had a play with the USB_HID_Keyboard demo (from the Wiki) and modified it slightly.... So now supports 'space' :) and also has a Ctrl function (demonstrated here with Ctrl-A, Ctrl-X and then Ctrl-V) which passes Ctrl+key. USB_HID_Keyboard.fcfx I invented the Flowcode if .... else if ..... (he he) It...
by mnf
Wed Jan 31, 2018 3:05 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Sorry - I re-posted = hadn't noticed we were on a new page.....
by mnf
Wed Jan 31, 2018 1:14 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

Thanks Leigh, I'll play a while with the AsciiToKeyPress - that is some mighty switch statement - I managed to save >300 bytes just by getting rid of the switch for 'a'..'z' (the scan codes are sequential so easily map to the calculation 0x4 + c - 'a'). Do you mean you have a UART to USB bridge virt...
by mnf
Wed Jan 31, 2018 1:05 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Hi Ferla,

I haven't managed to get a UDPSocket to work - although I can send a message to the UART after creation - I managed to get a WebServer apllication working (although see above) - Ben / Leigh might have some better examples.

Martin
by mnf
Wed Jan 31, 2018 12:18 pm
Forum: User Components
Topic: AM2320 temp/ hum sensor. Same as DHT22?
Replies: 3
Views: 6157

Re: AM2320 temp/ hum sensor. Same as DHT22?

I have a simple program that reads all the data from a AM2320 sensor. It was written for the Arduino - but should work on PIC (you'll need pull-ups on the SDA and SCL lines) am2320.fcfx Note that it reads a block of 8 bytes - First 2 mirror command (3, 4) and last 2 are CRC. Humidity is at 2,3 and t...
by mnf
Wed Jan 31, 2018 8:50 am
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Hi Ferla,

Sorry - I can get the WebServer component to work (though not with files from SD - see above) - but haven't had much joy with the UDP socket..
I get an output to UART following creation of the socket - but then things seem to grind to a halt. Ben / Leigh maybe have some examples ?

Martin
by mnf
Tue Jan 30, 2018 8:10 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

Thanks Leigh, Got the HID working using the above with just a couple of queries/problems: 1) Flowcode now deletes 7 .o files and rebuilds all the USB support files on every compile - which isn't really a problem it just seems a little odd (I haven't noticed this behavior on other projects. 2) More i...
by mnf
Tue Jan 30, 2018 9:01 am
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

Maybe I'm missing something but things don't seem to work so smoothly on the AVR 32u4. UART component - doesn't seem to work: So something simple - output a string to the UART.... Micro UART.fcfx This using an Arduino micro. Trying to use the USB HID (Initialise) Target folder: C:\Users\Martin\DOWNL...
by mnf
Fri Jan 26, 2018 8:26 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Now got the Ethernet port working AOK... Soldered in the 'int' connection to allow interrupts from the shield and also changed the SPI connection to software rather than hardware (which seems to have supplied the magic needed to get things working) I've queried SPI hardware mode on AVR before - is t...
by mnf
Fri Jan 26, 2018 7:30 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Thanks - all clear now!
by mnf
Thu Jan 25, 2018 8:19 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Sorry - I haven't managed to get my Ethernet board working under Flowcode (a Wiznet Wiz5100) - I'd hoped that the Wiz810Mj components (that use the Wiz5100 chip) would work - but no joy.. (Anyone any sample code here?) I can get UDP working under the Arduino toolset - using the EthernetUDP library.....
by mnf
Wed Jan 24, 2018 10:30 am
Forum: Flowcode V7
Topic: Object array
Replies: 8
Views: 4977

Re: Object array

I'd asked about a similar problem a while ago - how to access a pin defined by a variable so that it could be defined at runtime rather than compile time.. One idea I had was to connect multiple switches (or in my case outputs) to one port - then read (or write) all at once using a input whole port ...
by mnf
Tue Jan 23, 2018 7:13 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Hi Ferla, Could I get you to clarify a bit on what you are trying to achieve: 1) Some sample command strings and expected result. 2) Actual results. 3) I assume that you are trying to send a command from the PC to light/clear LEDs in the light strip - but are you trying to control single or multiple...
by mnf
Sun Jan 21, 2018 12:38 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

Strange: The Arduino IDE can find and program the board without a reset - it seems to 'hunt' through the serial ports (turn on the verbose output). Flowcode seems problematic - sometimes it 'forgets' the Com port and defaults to com1 - otherwise it seems to take at least two presses of reset before ...
by mnf
Fri Jan 19, 2018 9:12 am
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

A simple program that displays numbers (0 to 255 or the equivalent of 1 byte as here) in decimal, binary and hexadecimal. DisplayBase.fcfx Martin Ben - this loops around - rather than looping once (0..255) and then stopping it repeats. Any ideas ? Not sure where I'm writing past the end of a string???
by mnf
Thu Jan 18, 2018 2:51 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Hi Ferla, I'm not sure what you need to convert here. The decimal or hex string is just a representation of the underlying binary that you will send to the LEDs Hex is neat for programming because each 4 bits can be represented by one character. Decimal doesn't have quite such an easy conversion but...
by mnf
Wed Jan 17, 2018 2:21 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Thanks Ben,

A very small demo - changed above to read variable length integers...
BufferDemo.fcfx
(13.54 KiB) Downloaded 239 times
Martin
by mnf
Wed Jan 17, 2018 1:46 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

Re: AVR 32u4 programming

Thanks Leigh - I chose 32u4. I'll have a try using Leonardo. - No joy using the Leonardo settings. Pressing 'reset' a couple of times cleared the dialog - but gave 'can't find com5' and uploading failed. Later: I did manage to get it to work using AVRDUDE and the following command: c:\Users\Martin\A...
by mnf
Wed Jan 17, 2018 1:07 pm
Forum: Flowcode V7
Topic: AVR 32u4 programming
Replies: 15
Views: 6728

AVR 32u4 programming

Attempting to test a Atmega 32u4 program (an Adafruit Feather with Lora) How is the program uploaded to the board? - Under project options there is no option for setting the USB port. Compiling 'to chip' gives a 'cannot find usbtiny' error - without pausing. (I do have a licence for the AVR processo...
by mnf
Tue Jan 16, 2018 9:04 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

A useful addition to the circular buffer component would be a Peek() macro that returns the current byte without advancing the current index. Alternatively a ReplaceByte() function that decrements the current index and 'replaces' the last byte returned by GetByte(). This makes some functions (such a...
by mnf
Mon Jan 15, 2018 7:20 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Ok, I think the problem arises because of .CarattereComando = StringToInt$ (.Str_Risp_CarComando) .Tot_SingLed = StringToInt$ (.Str_Risp_SigLed) .Tot_GroupLed = StringToInt$ (.Str_Risp_GrupLed) (in macro ContrallaComando) StringToInt$(str) converts (or attempts to convert) a string to an integer... ...
by mnf
Sun Jan 14, 2018 9:04 pm
Forum: Flowcode V7
Topic: UDP string rx
Replies: 40
Views: 17626

Re: UDP string rx

Hi Ferla, Looking at the code snippet: You have str = A001. Assuming you mean str = "A001" (ComandoRicevuto) You can just use cmd = str[0] rather than using mid$? chardemo.fcfx Demonstrates a very simple loop through string contents with a decision on the character - I've output the details to a com...
by mnf
Thu Jan 11, 2018 7:20 pm
Forum: Flowcode V7
Topic: Searching Circular Buffer - Any Advice?
Replies: 3
Views: 3079

Re: Searching Circular Buffer - Any Advice?

Hi, Did you make any progress with this? I think the approach needed may vary - how is data added to the buffer (on an interrupt or after a macro call for example). Is data before the start byte 'junk' - in which case reading bytes using GetByte and checking the value would be a valid approach.. Alt...